Initial addition of the Arcade study feature. Add connections as the first working game.
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m4s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m4s
This commit is contained in:
parent
7b90409f2e
commit
611a585757
43 changed files with 5990 additions and 68 deletions
40
prisma/migrations/20260714010000_add_arcade/migration.sql
Normal file
40
prisma/migrations/20260714010000_add_arcade/migration.sql
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "ArcadePack" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"classId" TEXT NOT NULL,
|
||||
"gameType" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"description" TEXT,
|
||||
"schemaVersion" INTEGER NOT NULL,
|
||||
"sourceJson" TEXT NOT NULL,
|
||||
"normalizedJson" TEXT NOT NULL,
|
||||
"validationReportJson" TEXT NOT NULL,
|
||||
"sortOrder" INTEGER NOT NULL DEFAULT 0,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "ArcadePack_classId_fkey" FOREIGN KEY ("classId") REFERENCES "Class" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "ArcadeAttempt" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"arcadePackId" TEXT NOT NULL,
|
||||
"mode" TEXT NOT NULL,
|
||||
"score" INTEGER NOT NULL,
|
||||
"maxScore" INTEGER NOT NULL,
|
||||
"accuracy" REAL NOT NULL,
|
||||
"durationSeconds" INTEGER NOT NULL,
|
||||
"mistakes" INTEGER NOT NULL,
|
||||
"hintsUsed" INTEGER NOT NULL,
|
||||
"settingsJson" TEXT NOT NULL,
|
||||
"resultsJson" TEXT NOT NULL,
|
||||
"seed" TEXT NOT NULL,
|
||||
"completedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "ArcadeAttempt_arcadePackId_fkey" FOREIGN KEY ("arcadePackId") REFERENCES "ArcadePack" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "ArcadePack_classId_gameType_sortOrder_idx" ON "ArcadePack"("classId", "gameType", "sortOrder");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "ArcadeAttempt_arcadePackId_completedAt_idx" ON "ArcadeAttempt"("arcadePackId", "completedAt");
|
||||
Loading…
Add table
Add a link
Reference in a new issue