From 6822ef0577c60a43d5daf6041936ac962d78bb0b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 2 Sep 2019 12:11:04 +0200 Subject: [PATCH] =?utf8?q?bank=5Ftransaction=5Facc=5Ftrans:=20=C3=BCberfl?= =?utf8?q?=C3=BCssige=20Spalte=20=C2=BBid=C2=AB=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Primärschlüssel sind zwei andere Spalten, und die Präsenz dieser Nicht-Primärschlüssel-Spalte zusammen mit Typ »serial« macht Probleme, weil Rose kein Default für solche Spalten kennt. --- SL/DB/MetaSetup/BankTransactionAccTrans.pm | 1 - .../bank_transaction_acc_trans_remove_wrong_primary_key.sql | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 sql/Pg-upgrade2/bank_transaction_acc_trans_remove_wrong_primary_key.sql diff --git a/SL/DB/MetaSetup/BankTransactionAccTrans.pm b/SL/DB/MetaSetup/BankTransactionAccTrans.pm index 5055ca4a5..b4ba2e26e 100644 --- a/SL/DB/MetaSetup/BankTransactionAccTrans.pm +++ b/SL/DB/MetaSetup/BankTransactionAccTrans.pm @@ -14,7 +14,6 @@ __PACKAGE__->meta->columns( ar_id => { type => 'integer' }, bank_transaction_id => { type => 'integer', not_null => 1 }, gl_id => { type => 'integer' }, - id => { type => 'serial', not_null => 1 }, itime => { type => 'timestamp', default => 'now()' }, mtime => { type => 'timestamp' }, ); diff --git a/sql/Pg-upgrade2/bank_transaction_acc_trans_remove_wrong_primary_key.sql b/sql/Pg-upgrade2/bank_transaction_acc_trans_remove_wrong_primary_key.sql new file mode 100644 index 000000000..8b2764735 --- /dev/null +++ b/sql/Pg-upgrade2/bank_transaction_acc_trans_remove_wrong_primary_key.sql @@ -0,0 +1,5 @@ +-- @tag: bank_transaction_acc_trans_remove_wrong_primary_key +-- @description: bank_transaction_acc_trans_remove_wrong_primary_key +-- @depends: release_3_5_4 +ALTER TABLE bank_transaction_acc_trans +DROP COLUMN id; -- 2.20.1