Skip to content

Commit 307a57e

Browse files
committed
add foreign key to job on workspace_modules
1 parent 82c8a3c commit 307a57e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

coderd/database/dump.sql

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/foreign_key_constraint.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/migrations/000274_workspace_modules.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ADD
55

66
CREATE TABLE workspace_modules (
77
id uuid NOT NULL,
8-
job_id uuid NOT NULL,
8+
job_id uuid NOT NULL REFERENCES provisioner_jobs (id) ON DELETE CASCADE,
99
transition workspace_transition NOT NULL,
1010
source TEXT NOT NULL,
1111
version TEXT NOT NULL,

0 commit comments

Comments
 (0)