From: Moritz Bunkus Date: Wed, 31 Jan 2007 13:12:16 +0000 (+0000) Subject: Die Spalte "taxzone_id" in den Tabellen customer und vendor darf nicht NULL sein. X-Git-Tag: release-2.4.2~202 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9997516d96b2026a9913db2e8a70f8aefd95d03b;p=kivitendo-erp.git Die Spalte "taxzone_id" in den Tabellen customer und vendor darf nicht NULL sein. --- diff --git a/sql/Pg-upgrade2/customer_vendor_taxzone_id.sql b/sql/Pg-upgrade2/customer_vendor_taxzone_id.sql new file mode 100644 index 000000000..9ad3f1e61 --- /dev/null +++ b/sql/Pg-upgrade2/customer_vendor_taxzone_id.sql @@ -0,0 +1,10 @@ +-- @tag: customer_vendor_taxzone_id +-- @description: Die Spalte "taxzone_id" in den Tabellen customer und vendor darf nicht NULL sein. +-- @depends: release_2_4_1 +UPDATE customer SET taxzone_id = 0 WHERE taxzone_id ISNULL; +ALTER TABLE customer ALTER COLUMN taxzone_id SET DEFAULT 0; +ALTER TABLE customer ALTER COLUMN taxzone_id SET NOT NULL; + +UPDATE vendor SET taxzone_id = 0 WHERE taxzone_id ISNULL; +ALTER TABLE vendor ALTER COLUMN taxzone_id SET DEFAULT 0; +ALTER TABLE vendor ALTER COLUMN taxzone_id SET NOT NULL;