Skip to content

Commit

Permalink
Add unique constraint on strategies.signature column; WDK does not al…
Browse files Browse the repository at this point in the history
…low dups but nice to enforce in the schema
  • Loading branch information
ryanrdoherty committed Oct 3, 2024
1 parent 4c3b400 commit 6ab7219
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Model/data/create_schema_userlogins5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ CREATE TABLE userlogins5.strategies (
prev_strategy_id NUMBER(12),
migration_id NUMBER(12),
CONSTRAINT "strategies_pk" PRIMARY KEY (strategy_id),
CONSTRAINT "strategies_uq01" UNIQUE (signature),
CONSTRAINT "strategies_fk01" FOREIGN KEY (root_step_id)
REFERENCES userlogins5.steps (step_id),
CONSTRAINT "strategies_fk02" FOREIGN KEY (user_id)
Expand Down
1 change: 1 addition & 0 deletions Model/data/create_schema_userlogins5_postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ CREATE TABLE userlogins5.strategies (
prev_strategy_id NUMERIC(12),
migration_id NUMERIC(12),
CONSTRAINT "strategies_pk" PRIMARY KEY (strategy_id),
CONSTRAINT "strategies_uq01" UNIQUE (signature),
CONSTRAINT "strategies_fk01" FOREIGN KEY (root_step_id)
REFERENCES userlogins5.steps (step_id),
CONSTRAINT "strategies_fk02" FOREIGN KEY (user_id)
Expand Down

0 comments on commit 6ab7219

Please sign in to comment.