From c9370086d4e1dd6051847ecdd7a0c85bbf9fc2a1 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 20 May 2014 10:54:12 +0200 Subject: [PATCH] Lange Datenbankfelder bei bestimmten Lieferantenfeldern MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Analog zu Commit 72ad92fd die Feldlänge bei bestimmten Datenbankfelder erhöht (vorher varchar, jetzt text) account_number bank_code ustid name contact --- SL/DB/MetaSetup/Vendor.pm | 10 +++++----- sql/Pg-upgrade2/vendor_long_entries.sql | 10 ++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 sql/Pg-upgrade2/vendor_long_entries.sql diff --git a/SL/DB/MetaSetup/Vendor.pm b/SL/DB/MetaSetup/Vendor.pm index 067e21ada..ef3f37f48 100644 --- a/SL/DB/MetaSetup/Vendor.pm +++ b/SL/DB/MetaSetup/Vendor.pm @@ -9,15 +9,15 @@ use base qw(SL::DB::Object); __PACKAGE__->meta->table('vendor'); __PACKAGE__->meta->columns( - account_number => { type => 'varchar', length => 15 }, + account_number => { type => 'text' }, bank => { type => 'text' }, - bank_code => { type => 'varchar', length => 10 }, + bank_code => { type => 'text' }, bcc => { type => 'text' }, bic => { type => 'varchar', length => 100 }, business_id => { type => 'integer' }, cc => { type => 'text' }, city => { type => 'varchar', length => 75 }, - contact => { type => 'varchar', length => 75 }, + contact => { type => 'text' }, country => { type => 'varchar', length => 75 }, creditlimit => { type => 'numeric', precision => 15, scale => 5 }, currency_id => { type => 'integer', not_null => 1 }, @@ -37,7 +37,7 @@ __PACKAGE__->meta->columns( language => { type => 'varchar', length => 5 }, language_id => { type => 'integer' }, mtime => { type => 'timestamp' }, - name => { type => 'varchar', length => 75, not_null => 1 }, + name => { type => 'text', not_null => 1 }, notes => { type => 'text' }, obsolete => { type => 'boolean', default => 'false' }, payment_id => { type => 'integer' }, @@ -50,7 +50,7 @@ __PACKAGE__->meta->columns( terms => { type => 'integer', default => '0' }, user_password => { type => 'varchar', length => 12 }, username => { type => 'varchar', length => 50 }, - ustid => { type => 'varchar', length => 14 }, + ustid => { type => 'text' }, v_customer_id => { type => 'text' }, vendornumber => { type => 'text' }, zipcode => { type => 'varchar', length => 10 }, diff --git a/sql/Pg-upgrade2/vendor_long_entries.sql b/sql/Pg-upgrade2/vendor_long_entries.sql new file mode 100644 index 000000000..8a6315e18 --- /dev/null +++ b/sql/Pg-upgrade2/vendor_long_entries.sql @@ -0,0 +1,10 @@ +-- @tag: vendor_long_entries +-- @description: Lange Spalten für Lieferantentabelle +-- @depends: release_3_1_0 + +ALTER TABLE vendor ALTER COLUMN account_number TYPE text; +ALTER TABLE vendor ALTER COLUMN bank_code TYPE text; +ALTER TABLE vendor ALTER COLUMN ustid TYPE text; +ALTER TABLE vendor ALTER COLUMN name TYPE text; +ALTER TABLE vendor ALTER COLUMN contact TYPE text; + -- 2.20.1