Skip to content

Commit

Permalink
Move unique constraint to repeatable migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Perholehto committed Aug 17, 2023
1 parent 26aac06 commit a3c289f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE TABLE service_calendar.substitute_operating_period (
substitute_operating_period_id uuid DEFAULT gen_random_uuid(),
period_name text UNIQUE NOT NULL,
period_name text NOT NULL,
is_preset boolean NOT NULL DEFAULT FALSE
);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE service_calendar.substitute_operating_period DROP CONSTRAINT substitute_operating_period_period_name_key;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE service_calendar.substitute_operating_period
ADD CONSTRAINT substitute_operating_period_period_name_key UNIQUE (period_name);

0 comments on commit a3c289f

Please sign in to comment.