/* Warnings: - You are about to drop the `Example` table. If the table is not empty, all the data it contains will be lost. */ -- CreateEnum CREATE TYPE "TodoStatus" AS ENUM ('INCOMPLETE', 'COMPLETE'); -- DropTable DROP TABLE "Example"; -- CreateTable CREATE TABLE "Todo" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "text" TEXT NOT NULL, "status" "TodoStatus" NOT NULL DEFAULT 'INCOMPLETE', "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "Todo_pkey" PRIMARY KEY ("id") ); -- AddForeignKey ALTER TABLE "Todo" ADD CONSTRAINT "Todo_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;