From d0922342ca67e19d90e04df6407adc2dcc3d597e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:22:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- datamodel/changelogs/0101/0101_1_drop_trigger.sql | 2 +- datamodel/changelogs/0101/0101_2_balises.sql | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/datamodel/changelogs/0101/0101_1_drop_trigger.sql b/datamodel/changelogs/0101/0101_1_drop_trigger.sql index eb6cd823..bad25096 100644 --- a/datamodel/changelogs/0101/0101_1_drop_trigger.sql +++ b/datamodel/changelogs/0101/0101_1_drop_trigger.sql @@ -2,4 +2,4 @@ DROP TRIGGER IF EXISTS tr_sign_on_delete_reorder ON signalo_db.sign; DROP TRIGGER IF EXISTS tr_sign_on_update_prevent_fk_frame ON signalo_db.sign; DROP FUNCTION IF EXISTS signalo_db.ft_reorder_signs_in_frame(); -DROP FUNCTION IF EXISTS signalo_db.ft_sign_prevent_fk_frame_update(); \ No newline at end of file +DROP FUNCTION IF EXISTS signalo_db.ft_sign_prevent_fk_frame_update(); diff --git a/datamodel/changelogs/0101/0101_2_balises.sql b/datamodel/changelogs/0101/0101_2_balises.sql index a6659706..a9985135 100644 --- a/datamodel/changelogs/0101/0101_2_balises.sql +++ b/datamodel/changelogs/0101/0101_2_balises.sql @@ -26,10 +26,10 @@ CREATE TABLE signalo_db.vl_marker_type ( default_inscription2 text, default_inscription3 text, default_inscription4 text, - directional_sign boolean, - img_de_right text, - img_fr_right text, - img_it_right text, + directional_sign boolean, + img_de_right text, + img_fr_right text, + img_it_right text, img_ro_right text); ALTER TABLE signalo_db.sign @@ -93,7 +93,7 @@ ALTER TABLE ONLY signalo_db.vl_marker_type -- Set foreign key for user signs in signalo_db.sign ALTER TABLE ONLY signalo_db.sign ADD CONSTRAINT fkey_vl_marker_type FOREIGN KEY (fk_marker_type) REFERENCES signalo_db.vl_marker_type(id) MATCH FULL; - + -- Recreate functions and triggers in signalo_db.sign -- FUNCTION: signalo_db.ft_reorder_signs_in_frame() CREATE OR REPLACE FUNCTION signalo_db.ft_reorder_signs_in_frame() @@ -113,7 +113,7 @@ AS $BODY$ END LOOP; RETURN OLD; END; - + $BODY$; ALTER FUNCTION signalo_db.ft_reorder_signs_in_frame() @@ -131,7 +131,7 @@ AS $BODY$ BEGIN RAISE EXCEPTION 'A sign cannot be reassigned to another frame.'; END; - + $BODY$; ALTER FUNCTION signalo_db.ft_sign_prevent_fk_frame_update() @@ -155,4 +155,3 @@ CREATE OR REPLACE TRIGGER tr_sign_on_update_prevent_fk_frame FOR EACH ROW WHEN (new.fk_frame <> old.fk_frame) EXECUTE FUNCTION signalo_db.ft_sign_prevent_fk_frame_update(); -