From ed55c696cd083bfaa5429082a9c5edd4ebde0cd8 Mon Sep 17 00:00:00 2001 From: Sebastien Castiel Date: Tue, 5 Dec 2023 17:39:05 -0500 Subject: First version --- .../20231205214145_add_group_to_expenses/migration.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 prisma/migrations/20231205214145_add_group_to_expenses/migration.sql (limited to 'prisma/migrations/20231205214145_add_group_to_expenses/migration.sql') diff --git a/prisma/migrations/20231205214145_add_group_to_expenses/migration.sql b/prisma/migrations/20231205214145_add_group_to_expenses/migration.sql new file mode 100644 index 0000000..aa012dd --- /dev/null +++ b/prisma/migrations/20231205214145_add_group_to_expenses/migration.sql @@ -0,0 +1,11 @@ +/* + Warnings: + + - Added the required column `groupId` to the `Expense` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "Expense" ADD COLUMN "groupId" TEXT NOT NULL; + +-- AddForeignKey +ALTER TABLE "Expense" ADD CONSTRAINT "Expense_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- cgit v1.3