Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 13, 2024
1 parent 4123f90 commit d092234
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion datamodel/changelogs/0101/0101_1_drop_trigger.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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();
DROP FUNCTION IF EXISTS signalo_db.ft_sign_prevent_fk_frame_update();
15 changes: 7 additions & 8 deletions datamodel/changelogs/0101/0101_2_balises.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -113,7 +113,7 @@ AS $BODY$
END LOOP;
RETURN OLD;
END;

$BODY$;

ALTER FUNCTION signalo_db.ft_reorder_signs_in_frame()
Expand All @@ -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()
Expand All @@ -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();

0 comments on commit d092234

Please sign in to comment.