nest-autocrud/prisma/migrations/20241102021258_init/migration.sql

12 lines
353 B
MySQL
Raw Permalink Normal View History

-- CreateTable
CREATE TABLE "todo" (
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
"name" TEXT NOT NULL,
"user_id" UUID NOT NULL,
CONSTRAINT "todo_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "todo" ADD CONSTRAINT "todo_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "account"("id") ON DELETE RESTRICT ON UPDATE CASCADE;