kidshift-be/prisma/migrations/20240616160848_add_child_ref/migration.sql

12 lines
389 B
MySQL
Raw Normal View History

2024-06-16 16:08:55 +00:00
/*
Warnings:
- Added the required column `child_id` to the `Task` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Task" ADD COLUMN "child_id" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "Task" ADD CONSTRAINT "Task_child_id_fkey" FOREIGN KEY ("child_id") REFERENCES "Child"("id") ON DELETE RESTRICT ON UPDATE CASCADE;