From 0c243227c44e03a86f582d4601176f52eb2f9a76 Mon Sep 17 00:00:00 2001 From: Albert Bofill Date: Tue, 20 Aug 2024 12:42:35 +0200 Subject: [PATCH] enhancement: prophylactic drop trigger before create anew --- updates/36/36012/utils/trg.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/updates/36/36012/utils/trg.sql b/updates/36/36012/utils/trg.sql index 4f1378d263..b224880628 100644 --- a/updates/36/36012/utils/trg.sql +++ b/updates/36/36012/utils/trg.sql @@ -8,14 +8,18 @@ This version of Giswater is provided by Giswater Association SET search_path = SCHEMA_NAME, public, pg_catalog; --05/08/2024 +DROP TRIGGER IF EXISTS gw_trg_ui_doc_x_visit ON v_ui_doc_x_visit; CREATE trigger gw_trg_ui_doc_x_visit instead OF INSERT OR DELETE OR UPDATE ON v_ui_doc_x_visit FOR each row EXECUTE function gw_trg_ui_doc('doc_x_visit'); +DROP TRIGGER IF EXISTS gw_trg_ui_doc_x_arc ON v_ui_doc_x_arc; CREATE trigger gw_trg_ui_doc_x_arc instead OF INSERT OR DELETE OR UPDATE ON v_ui_doc_x_arc FOR each row EXECUTE function gw_trg_ui_doc('doc_x_arc'); +DROP TRIGGER IF EXISTS gw_trg_ui_doc_x_connec ON v_ui_doc_x_connec; CREATE trigger gw_trg_ui_doc_x_connec instead OF INSERT OR DELETE OR UPDATE ON v_ui_doc_x_connec FOR each row EXECUTE function gw_trg_ui_doc('doc_x_connec'); +DROP TRIGGER IF EXISTS gw_trg_ui_doc_x_node ON v_ui_doc_x_node; CREATE trigger gw_trg_ui_doc_x_node instead OF INSERT OR DELETE OR UPDATE ON v_ui_doc_x_node FOR each row EXECUTE function gw_trg_ui_doc('doc_x_node');