Alte Trigger anpassen
authorNiclas Zimmermann <niclas@kivitendo-premium.de>
Tue, 12 Mar 2013 10:41:05 +0000 (11:41 +0100)
committerNiclas Zimmermann <niclas@kivitendo-premium.de>
Tue, 12 Mar 2013 10:56:01 +0000 (11:56 +0100)
Die Tabellen vendortax und customertax wurden in Commit 9f07753b
entfernt. Allerdings mussten die Trigger del_vendor() und
del_customer() noch angepasst werden.

Behebt Bug #2201.

sql/Pg-upgrade2/delete_cust_vend_tax.sql [new file with mode: 0644]

diff --git a/sql/Pg-upgrade2/delete_cust_vend_tax.sql b/sql/Pg-upgrade2/delete_cust_vend_tax.sql
new file mode 100644 (file)
index 0000000..386e84c
--- /dev/null
@@ -0,0 +1,17 @@
+-- @tag: delete_cust_vend_tax
+-- @description: Alte Tabellen löschen
+-- @depends: delete_customertax_vendortax_partstax
+-- @charset: utf-8
+
+CREATE OR REPLACE FUNCTION del_customer() RETURNS "trigger" AS
+  'BEGIN
+     DELETE FROM shipto WHERE trans_id = old.id;
+     RETURN NULL;
+   END;' LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION del_vendor() RETURNS "trigger" AS
+  'BEGIN
+    DELETE FROM shipto WHERE trans_id = old.id;
+    RETURN NULL;
+  END;' LANGUAGE plpgsql;
+