From 570aa713b1b2becf7c06c89610c75d2cb119b532 Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Wed, 6 Dec 2023 15:08:52 -0500
Subject: Delete expense

---
 prisma/migrations/20231206195936_add_cascades/migration.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 prisma/migrations/20231206195936_add_cascades/migration.sql

(limited to 'prisma/migrations/20231206195936_add_cascades/migration.sql')

diff --git a/prisma/migrations/20231206195936_add_cascades/migration.sql b/prisma/migrations/20231206195936_add_cascades/migration.sql
new file mode 100644
index 0000000..4075d7a
--- /dev/null
+++ b/prisma/migrations/20231206195936_add_cascades/migration.sql
@@ -0,0 +1,11 @@
+-- DropForeignKey
+ALTER TABLE "ExpensePaidFor" DROP CONSTRAINT "ExpensePaidFor_expenseId_fkey";
+
+-- DropForeignKey
+ALTER TABLE "Participant" DROP CONSTRAINT "Participant_groupId_fkey";
+
+-- AddForeignKey
+ALTER TABLE "Participant" ADD CONSTRAINT "Participant_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "ExpensePaidFor" ADD CONSTRAINT "ExpensePaidFor_expenseId_fkey" FOREIGN KEY ("expenseId") REFERENCES "Expense"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- 
cgit v1.3

