From: Thomas Heck Date: Wed, 29 Aug 2012 13:32:40 +0000 (+0200) Subject: CRM-Datenbankfelder "cp_street", "cp_zipcode" und "cp_city" in die Tabelle "contacts... X-Git-Tag: release-3.0.0beta1~268 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f33abdbb755528638fe81ea62200e69e5583ec00;p=kivitendo-erp.git CRM-Datenbankfelder "cp_street", "cp_zipcode" und "cp_city" in die Tabelle "contacts" eingefügt. --- diff --git a/sql/Pg-upgrade2/contacts_add_street_and_zipcode_and_city.pl b/sql/Pg-upgrade2/contacts_add_street_and_zipcode_and_city.pl new file mode 100644 index 000000000..f1dde25bf --- /dev/null +++ b/sql/Pg-upgrade2/contacts_add_street_and_zipcode_and_city.pl @@ -0,0 +1,24 @@ +# @tag: contacts_add_street_and_zipcode_and_city +# @description: Spalten hinzufügen. +# @depends: release_2_7_0 +# @charset: utf-8 + +use utf8; +use strict; + +my @queries = ( + 'ALTER TABLE contacts ADD COLUMN cp_street text;', + 'ALTER TABLE contacts ADD COLUMN cp_zipcode text;', + 'ALTER TABLE contacts ADD COLUMN cp_city text;', +); + +foreach my $query (@queries) { + if ( $dbh->do($query) ) { + next; + } + + $dbh->rollback(); + $dbh->begin_work(); +} + +return 1;