19 lines
722 B
SQL
19 lines
722 B
SQL
-- RedefineTables
|
|
PRAGMA defer_foreign_keys=ON;
|
|
PRAGMA foreign_keys=OFF;
|
|
CREATE TABLE "new_Special" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"name" TEXT NOT NULL,
|
|
"maxAttempts" INTEGER NOT NULL DEFAULT 7,
|
|
"unlockSteps" TEXT NOT NULL,
|
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"launchDate" DATETIME,
|
|
"endDate" DATETIME
|
|
);
|
|
INSERT INTO "new_Special" ("createdAt", "id", "maxAttempts", "name", "unlockSteps") SELECT "createdAt", "id", "maxAttempts", "name", "unlockSteps" FROM "Special";
|
|
DROP TABLE "Special";
|
|
ALTER TABLE "new_Special" RENAME TO "Special";
|
|
CREATE UNIQUE INDEX "Special_name_key" ON "Special"("name");
|
|
PRAGMA foreign_keys=ON;
|
|
PRAGMA defer_foreign_keys=OFF;
|