From 505254f12ad8d7dc17679df973eae5a9f33f54bf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 4 Jan 2007 15:12:44 +0000 Subject: [PATCH] Better safe than sorry. --- sql/Pg-upgrade2/tax_primary_key_taxkeys_foreign_keys.sql | 1 + 1 file changed, 1 insertion(+) 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); -- 2.20.1