Files
cat-sitting-planner/prisma/migrations/20260112213124_remove_title_default/migration.sql

20 lines
790 B
SQL

-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Plan" (
"id" TEXT NOT NULL PRIMARY KEY,
"title" TEXT NOT NULL,
"password" TEXT NOT NULL,
"startDate" DATETIME NOT NULL,
"endDate" DATETIME NOT NULL,
"instructions" TEXT,
"webhookUrl" TEXT,
"notifyAll" BOOLEAN NOT NULL DEFAULT true,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO "new_Plan" ("createdAt", "endDate", "id", "instructions", "notifyAll", "password", "startDate", "title", "webhookUrl") SELECT "createdAt", "endDate", "id", "instructions", "notifyAll", "password", "startDate", "title", "webhookUrl" FROM "Plan";
DROP TABLE "Plan";
ALTER TABLE "new_Plan" RENAME TO "Plan";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;