From: Moritz Bunkus Date: Thu, 4 Jan 2007 15:12:44 +0000 (+0000) Subject: Better safe than sorry. X-Git-Tag: release-2.4.1~1^2~92 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=505254f12ad8d7dc17679df973eae5a9f33f54bf;p=kivitendo-erp.git Better safe than sorry. --- diff --git a/sql/Pg-upgrade2/tax_primary_key_taxkeys_foreign_keys.sql b/sql/Pg-upgrade2/tax_primary_key_taxkeys_foreign_keys.sql index cc4b7cf0a..8a41f7b23 100644 --- a/sql/Pg-upgrade2/tax_primary_key_taxkeys_foreign_keys.sql +++ b/sql/Pg-upgrade2/tax_primary_key_taxkeys_foreign_keys.sql @@ -1,5 +1,6 @@ -- @tag: tax_primary_key_taxkeys_foreign_keys -- @description: Legt in tax einen neuen Primärschlüssel und in taxkeys einen neuen Fremdschlüssel auf tax an. -- @depends: tax_id_if_taxkey_is_0 +UPDATE taxkeys SET tax_id = 0 WHERE taxkey_id = 0; ALTER TABLE tax ADD PRIMARY KEY (id); ALTER TABLE taxkeys ADD FOREIGN KEY (tax_id) REFERENCES tax (id);