From: Moritz Bunkus Date: Mon, 2 Sep 2019 10:11:04 +0000 (+0200) Subject: bank_transaction_acc_trans: überflüssige Spalte »id« entfernt X-Git-Tag: release-3.5.6.1~497 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6822ef0577c60a43d5daf6041936ac962d78bb0b;p=kivitendo-erp.git bank_transaction_acc_trans: überflüssige Spalte »id« entfernt 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. --- 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;