From 132592c6ef62c4c15072b1188b0d5415a3d10510 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 23 Jan 2015 13:12:26 +0100 Subject: [PATCH] =?utf8?q?Upgradeskript-Abh=C3=A4ngigkeiten=20ge=C3=A4nder?= =?utf8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit unit_foreign_key_for_line_items muss nach oe_do_delete_via_trigger ausgeführt werden, sonst werden die Fremdschlüssel wieder gelöscht. --- SL/DBUpgrade2.pm | 1 + sql/Pg-upgrade2/unit_foreign_key_for_line_items.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index 650258378..0fd18b59c 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -185,6 +185,7 @@ sub process_query { # Query is complete. Send it. $sth = $dbh->prepare($query); + $::lxdebug->dump(0, "bb: query: ", $query); if (!$sth->execute()) { my $errstr = $dbh->errstr; return $errstr // '' if $self->{return_on_error}; diff --git a/sql/Pg-upgrade2/unit_foreign_key_for_line_items.sql b/sql/Pg-upgrade2/unit_foreign_key_for_line_items.sql index d99e1a7fa..ba547c824 100644 --- a/sql/Pg-upgrade2/unit_foreign_key_for_line_items.sql +++ b/sql/Pg-upgrade2/unit_foreign_key_for_line_items.sql @@ -1,6 +1,6 @@ -- @tag: unit_foreign_key_for_line_items -- @description: Fremdschlüssel auf »unit« für Beleg-Positionstabellen --- @depends: release_3_0_0 +-- @depends: release_3_0_0 oe_do_delete_via_trigger ALTER TABLE orderitems ADD FOREIGN KEY (unit) REFERENCES units (name); ALTER TABLE delivery_order_items ADD FOREIGN KEY (unit) REFERENCES units (name); ALTER TABLE invoice ADD FOREIGN KEY (unit) REFERENCES units (name); -- 2.20.1