From 9550f6ddce0a477670da5c4eeb91202b67db9edb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 13 Dec 2006 14:17:14 +0000 Subject: [PATCH] =?utf8?q?Die=20Spalte=20id=20in=20orderitems=20muss=20nic?= =?utf8?q?ht=20unbedingt=20eindeutig=20sein.=20Also=20den=20Prim=C3=A4rsch?= =?utf8?q?l=C3=BCssel=20l=C3=B6schen.=20Wenn=20er=20nicht=20mehr=20existie?= =?utf8?q?rt,=20dann=20auch=20keine=20Fehlermeldung=20ausgeben.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sql/Pg-upgrade/Pg-upgrade-2.2.0.36-2.2.0.37.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sql/Pg-upgrade/Pg-upgrade-2.2.0.36-2.2.0.37.pl diff --git a/sql/Pg-upgrade/Pg-upgrade-2.2.0.36-2.2.0.37.pl b/sql/Pg-upgrade/Pg-upgrade-2.2.0.36-2.2.0.37.pl new file mode 100644 index 000000000..909945b15 --- /dev/null +++ b/sql/Pg-upgrade/Pg-upgrade-2.2.0.36-2.2.0.37.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +# Datenbankupgrade: Potenziell existierenden Primärschlüssel von orderitems + +die("This script cannot be run from the command line.") unless ($main::form); + +sub do_update { + my $query = "ALTER TABLE orderitems DROP CONSTRAINT orderitems_pkey"; + if (!$dbh->do($query)) { + $main::lxdebug->message(0, "gab es nicht"); + $dbh->rollback(); + $dbh->begin_work(); + } + + return 1; +} + +return do_update(); -- 2.20.1