From 94163674db8f9bbdf14d9b808f805f376eedcb98 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Wed, 22 Nov 2023 17:32:33 +0100 Subject: [PATCH] disable triggers for changelog --- data_model/changelogs/0007/0007_anchor-point.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data_model/changelogs/0007/0007_anchor-point.sql b/data_model/changelogs/0007/0007_anchor-point.sql index 30f30a17..01c7a0bc 100644 --- a/data_model/changelogs/0007/0007_anchor-point.sql +++ b/data_model/changelogs/0007/0007_anchor-point.sql @@ -1,4 +1,7 @@ -CREATE TYPE signalo_db.anchor AS ENUM ('LEFT', 'CENTER', 'RIGHT'); +ALTER TABLE signalo_db.sign DISABLE TRIGGER tr_sign_on_delete_reorder; +ALTER TABLE signalo_db.sign DISABLE TRIGGER tr_sign_on_update_prevent_fk_frame; + +REATE TYPE signalo_db.anchor AS ENUM ('LEFT', 'CENTER', 'RIGHT'); CREATE TYPE signalo_db.sign_hanging AS ENUM ('RECTO', 'RECTO-VERSO', 'VERSO'); ALTER TABLE signalo_db.support ADD COLUMN group_by_anchor BOOLEAN NOT NULL DEFAULT TRUE; @@ -65,3 +68,6 @@ UPDATE signalo_db.sign SET fk_official_sign = replace(fk_official_sign, '-l', '' UPDATE signalo_db.sign SET fk_official_sign = replace(fk_official_sign, '-r', '') WHERE fk_official_sign LIKE '%-r'; ALTER TABLE signalo_db.sign ADD CONSTRAINT fkey_vl_official_sign FOREIGN KEY (fk_official_sign) REFERENCES signalo_db.vl_official_sign (id); + +ALTER TABLE signalo_db.sign ENABLE TRIGGER tr_sign_on_delete_reorder; +ALTER TABLE signalo_db.sign ENABLE TRIGGER tr_sign_on_update_prevent_fk_frame;