Skip to content

Commit ee5672e

Browse files
committed
Update unique constraints in workflow status tables to use ci_workflow_id and workflow_runner_id
1 parent aae32f6 commit ee5672e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/sql/34203900_workflow_status_latest_tables.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS "public"."ci_workflow_status_latest" (
1414
"updated_on" timestamptz NOT NULL,
1515
"updated_by" int4 NOT NULL,
1616
PRIMARY KEY ("id"),
17-
UNIQUE ("pipeline_id")
17+
UNIQUE ("ci_workflow_id")
1818
);
1919

2020
-- Create Sequence for cd_workflow_status_latest
@@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS "public"."cd_workflow_status_latest" (
3333
"updated_on" timestamptz NOT NULL,
3434
"updated_by" int4 NOT NULL,
3535
PRIMARY KEY ("id"),
36-
UNIQUE ("pipeline_id", "workflow_type")
36+
UNIQUE ("workflow_runner_id", "workflow_type")
3737
);
3838

3939
COMMIT;

0 commit comments

Comments
 (0)