Die Spalte id in orderitems muss nicht unbedingt eindeutig sein. Also den Primärschlü...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 13 Dec 2006 14:17:14 +0000 (14:17 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 13 Dec 2006 14:17:14 +0000 (14:17 +0000)
sql/Pg-upgrade/Pg-upgrade-2.2.0.36-2.2.0.37.pl [new file with mode: 0644]

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 (file)
index 0000000..909945b
--- /dev/null
@@ -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();