Files
spliit/prisma/migrations/20231205214145_add_group_to_expenses/migration.sql
Sebastien Castiel ed55c696cd First version
2023-12-05 17:39:05 -05:00

12 lines
397 B
SQL

/*
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;