Revision f33abdbb
Von Thomas Heck vor mehr als 12 Jahren hinzugefügt
sql/Pg-upgrade2/contacts_add_street_and_zipcode_and_city.pl | ||
---|---|---|
1 |
# @tag: contacts_add_street_and_zipcode_and_city |
|
2 |
# @description: Spalten hinzufügen. |
|
3 |
# @depends: release_2_7_0 |
|
4 |
# @charset: utf-8 |
|
5 |
|
|
6 |
use utf8; |
|
7 |
use strict; |
|
8 |
|
|
9 |
my @queries = ( |
|
10 |
'ALTER TABLE contacts ADD COLUMN cp_street text;', |
|
11 |
'ALTER TABLE contacts ADD COLUMN cp_zipcode text;', |
|
12 |
'ALTER TABLE contacts ADD COLUMN cp_city text;', |
|
13 |
); |
|
14 |
|
|
15 |
foreach my $query (@queries) { |
|
16 |
if ( $dbh->do($query) ) { |
|
17 |
next; |
|
18 |
} |
|
19 |
|
|
20 |
$dbh->rollback(); |
|
21 |
$dbh->begin_work(); |
|
22 |
} |
|
23 |
|
|
24 |
return 1; |
Auch abrufbar als: Unified diff
CRM-Datenbankfelder "cp_street", "cp_zipcode" und "cp_city" in die Tabelle "contacts" eingefügt.