Skip to content

Commit

Permalink
Merge branch 'develop' into jtw/increase-instant-finality-depth
Browse files Browse the repository at this point in the history
  • Loading branch information
silaslenihan authored May 23, 2024
2 parents 58afd44 + 1437410 commit 0d6a7ec
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-mice-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#db_update Add ON DELETE CASCADE to workflow tables
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE workflow_executions
DROP CONSTRAINT workflow_executions_workflow_id_fkey,
ADD CONSTRAINT workflow_executions_workflow_id_fkey
FOREIGN KEY (workflow_id)
REFERENCES workflow_specs(workflow_id)
ON DELETE CASCADE;

ALTER TABLE workflow_steps
DROP CONSTRAINT workflow_steps_workflow_execution_id_fkey,
ADD CONSTRAINT workflow_steps_workflow_execution_id_fkey
FOREIGN KEY (workflow_execution_id)
REFERENCES workflow_executions(id)
ON DELETE CASCADE;
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
ALTER TABLE workflow_executions
DROP CONSTRAINT workflow_executions_workflow_id_fkey,
ADD CONSTRAINT workflow_executions_workflow_id_fkey
FOREIGN KEY (workflow_id)
REFERENCES workflow_specs(workflow_id);

ALTER TABLE workflow_steps
DROP CONSTRAINT workflow_steps_workflow_execution_id_fkey,
ADD CONSTRAINT workflow_steps_workflow_execution_id_fkey
FOREIGN KEY (workflow_execution_id)
REFERENCES workflow_executions(id);
-- +goose StatementEnd

0 comments on commit 0d6a7ec

Please sign in to comment.