unit_foreign_key_for_line_items muss nach oe_do_delete_via_trigger ausgeführt
werden, sonst werden die Fremdschlüssel wieder gelöscht.
# Query is complete. Send it.
$sth = $dbh->prepare($query);
+ $::lxdebug->dump(0, "bb: query: ", $query);
if (!$sth->execute()) {
my $errstr = $dbh->errstr;
return $errstr // '<unknown database error>' if $self->{return_on_error};
-- @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);