chore: Add relation between a host and a membership for future cascades (#22975)
* chore: Add relation between a host and a membership for future cascades * Apply suggestion Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
parent
e29b7e83b8
commit
aaa59f1455
+11
@@ -0,0 +1,11 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Host" ADD COLUMN "memberId" INTEGER;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Host" ADD CONSTRAINT "Host_memberId_fkey"
|
||||
FOREIGN KEY ("memberId")
|
||||
REFERENCES "Membership"("id")
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
CREATE INDEX "Host_memberId_idx" ON "Host"("memberId");
|
||||
Reference in New Issue
Block a user