feat(specials): add launch and end dates for scheduling
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- 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;
|
||||
@@ -30,13 +30,15 @@ model Genre {
|
||||
}
|
||||
|
||||
model Special {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
maxAttempts Int @default(7)
|
||||
unlockSteps String // JSON array: "[2,4,7,11,16,30,60]"
|
||||
createdAt DateTime @default(now())
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
maxAttempts Int @default(7)
|
||||
unlockSteps String // JSON string: e.g. "[2, 4, 7, 11, 16, 30]"
|
||||
createdAt DateTime @default(now())
|
||||
launchDate DateTime?
|
||||
endDate DateTime?
|
||||
songs SpecialSong[]
|
||||
dailyPuzzles DailyPuzzle[]
|
||||
puzzles DailyPuzzle[]
|
||||
}
|
||||
|
||||
model SpecialSong {
|
||||
|
||||
Reference in New Issue
Block a user