diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2023-12-05 17:39:05 -0500 |
|---|---|---|
| committer | Sebastien Castiel <sebastien@castiel.me> | 2023-12-05 17:39:05 -0500 |
| commit | ed55c696cd083bfaa5429082a9c5edd4ebde0cd8 (patch) | |
| tree | 9f387881f85716bcb4a05d6fce13bfe59fbc9c17 /prisma/migrations/20231205214145_add_group_to_expenses/migration.sql | |
| parent | 1fd6e48807d455f66d9cd79db64cbf9e9f947c6c (diff) | |
First version
Diffstat (limited to 'prisma/migrations/20231205214145_add_group_to_expenses/migration.sql')
| -rw-r--r-- | prisma/migrations/20231205214145_add_group_to_expenses/migration.sql | 11 |
1 files changed, 11 insertions, 0 deletions
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; |
