From f33abdbb755528638fe81ea62200e69e5583ec00 Mon Sep 17 00:00:00 2001 From: Thomas Heck Date: Wed, 29 Aug 2012 15:32:40 +0200 Subject: [PATCH] =?utf8?q?CRM-Datenbankfelder=20"cp=5Fstreet",=20"cp=5Fzip?= =?utf8?q?code"=20und=20"cp=5Fcity"=20in=20die=20Tabelle=20"contacts"=20ei?= =?utf8?q?ngef=C3=BCgt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ...ontacts_add_street_and_zipcode_and_city.pl | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sql/Pg-upgrade2/contacts_add_street_and_zipcode_and_city.pl 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; -- 2.20.1