fix(web): remove workflow fk delete cascade problem with schema migration

This commit is contained in:
BennyKok
2024-01-02 01:13:13 +08:00
parent 2260b4be30
commit 61498dd3f5
6 changed files with 1381 additions and 1 deletions
+3 -1
View File
@@ -212,7 +212,9 @@ export const deploymentsTable = dbSchema.table("deployments", {
.references(() => workflowVersionTable.id),
workflow_id: uuid("workflow_id")
.notNull()
.references(() => workflowTable.id),
.references(() => workflowTable.id, {
onDelete: "cascade",
}),
machine_id: uuid("machine_id")
.notNull()
.references(() => machinesTable.id),