fix: add cascade delete to recipient fields

This commit is contained in:
Lucas Smith
2024-02-26 03:51:28 +00:00
parent f7c6b53258
commit 15ebe6dbaf
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
-- DropForeignKey
ALTER TABLE "Field" DROP CONSTRAINT "Field_recipientId_fkey";
-- AddForeignKey
ALTER TABLE "Field" ADD CONSTRAINT "Field_recipientId_fkey" FOREIGN KEY ("recipientId") REFERENCES "Recipient"("id") ON DELETE CASCADE ON UPDATE CASCADE;