From 37ce1a9c9052de31c299f37bdf591a8d87e3963a Mon Sep 17 00:00:00 2001 From: Waldemar Toews Date: Tue, 26 Mar 2013 13:32:46 +0100 Subject: [PATCH] Zusatzspalten fuer Kontoinhaber --- SL/DB/MetaSetup/Customer.pm | 1 + SL/DB/MetaSetup/SepaExportItem.pm | 2 ++ SL/DB/MetaSetup/Vendor.pm | 1 + sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql | 11 +++++++++++ 4 files changed, 15 insertions(+) create mode 100644 sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql diff --git a/SL/DB/MetaSetup/Customer.pm b/SL/DB/MetaSetup/Customer.pm index 2d5a155b9..3652c7a68 100644 --- a/SL/DB/MetaSetup/Customer.pm +++ b/SL/DB/MetaSetup/Customer.pm @@ -26,6 +26,7 @@ __PACKAGE__->meta->columns( delivery_term_id => { type => 'integer' }, department_1 => { type => 'varchar', length => 75 }, department_2 => { type => 'varchar', length => 75 }, + depositor => { type => 'text' }, direct_debit => { type => 'boolean', default => 'false' }, discount => { type => 'float', precision => 4 }, email => { type => 'text' }, diff --git a/SL/DB/MetaSetup/SepaExportItem.pm b/SL/DB/MetaSetup/SepaExportItem.pm index 08dd06e18..4746572dd 100644 --- a/SL/DB/MetaSetup/SepaExportItem.pm +++ b/SL/DB/MetaSetup/SepaExportItem.pm @@ -18,11 +18,13 @@ __PACKAGE__->meta->columns( execution_date => { type => 'date' }, id => { type => 'integer', not_null => 1, sequence => 'id' }, our_bic => { type => 'varchar', length => 100 }, + our_depositor => { type => 'text' }, our_iban => { type => 'varchar', length => 100 }, reference => { type => 'varchar', length => 35 }, requested_execution_date => { type => 'date' }, sepa_export_id => { type => 'integer', not_null => 1 }, vc_bic => { type => 'varchar', length => 100 }, + vc_depositor => { type => 'text' }, vc_iban => { type => 'varchar', length => 100 }, ); diff --git a/SL/DB/MetaSetup/Vendor.pm b/SL/DB/MetaSetup/Vendor.pm index f2988ad74..0493aa374 100644 --- a/SL/DB/MetaSetup/Vendor.pm +++ b/SL/DB/MetaSetup/Vendor.pm @@ -24,6 +24,7 @@ __PACKAGE__->meta->columns( delivery_term_id => { type => 'integer' }, department_1 => { type => 'varchar', length => 75 }, department_2 => { type => 'varchar', length => 75 }, + depositor => { type => 'text' }, direct_debit => { type => 'boolean', default => 'false' }, discount => { type => 'float', precision => 4 }, email => { type => 'text' }, diff --git a/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql b/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql new file mode 100644 index 000000000..cba51d711 --- /dev/null +++ b/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql @@ -0,0 +1,11 @@ +-- @tag: add_depositor_for_customer_vendor +-- @description: Einführen einer Depositor (Kontoinhaber) Spalte bei Customer bzw. Vendor +-- @depends: sepa + +ALTER TABLE customer ADD depositor text; +ALTER TABLE vendor ADD depositor text; +ALTER TABLE sepa_export_items ADD our_depositor text; +ALTER TABLE sepa_export_items ADD vc_depositor text; + +UPDATE customer SET depositor = name; +UPDATE vendor SET depositor = name; -- 2.20.1