From: Bernd Bleßmann Date: Fri, 23 Jan 2015 12:12:26 +0000 (+0100) Subject: Upgradeskript-Abhängigkeiten geändert X-Git-Tag: release-3.2.0beta~43^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=132592c6ef62c4c15072b1188b0d5415a3d10510;p=kivitendo-erp.git Upgradeskript-Abhängigkeiten geändert unit_foreign_key_for_line_items muss nach oe_do_delete_via_trigger ausgeführt werden, sonst werden die Fremdschlüssel wieder gelöscht. --- 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);