Revision 132592c6
Von Bernd Bleßmann vor fast 10 Jahren hinzugefügt
SL/DBUpgrade2.pm | ||
---|---|---|
185 | 185 |
# Query is complete. Send it. |
186 | 186 |
|
187 | 187 |
$sth = $dbh->prepare($query); |
188 |
$::lxdebug->dump(0, "bb: query: ", $query); |
|
188 | 189 |
if (!$sth->execute()) { |
189 | 190 |
my $errstr = $dbh->errstr; |
190 | 191 |
return $errstr // '<unknown database error>' if $self->{return_on_error}; |
sql/Pg-upgrade2/unit_foreign_key_for_line_items.sql | ||
---|---|---|
1 | 1 |
-- @tag: unit_foreign_key_for_line_items |
2 | 2 |
-- @description: Fremdschlüssel auf »unit« für Beleg-Positionstabellen |
3 |
-- @depends: release_3_0_0 |
|
3 |
-- @depends: release_3_0_0 oe_do_delete_via_trigger
|
|
4 | 4 |
ALTER TABLE orderitems ADD FOREIGN KEY (unit) REFERENCES units (name); |
5 | 5 |
ALTER TABLE delivery_order_items ADD FOREIGN KEY (unit) REFERENCES units (name); |
6 | 6 |
ALTER TABLE invoice ADD FOREIGN KEY (unit) REFERENCES units (name); |
Auch abrufbar als: Unified diff
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.