leaderboard and ranked systems
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Changed the type of `grade` on the `GameSession` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
- Changed the type of `grade` on the `LeaderboardEntry` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
- Changed the type of `grade` on the `Question` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "Grade" AS ENUM ('G3', 'G6', 'G9');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "GameSession" DROP COLUMN "grade",
|
||||
ADD COLUMN "grade" "Grade" NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "LeaderboardEntry" DROP COLUMN "grade",
|
||||
ADD COLUMN "grade" "Grade" NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Question" DROP COLUMN "grade",
|
||||
ADD COLUMN "grade" "Grade" NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "LeaderboardEntry_userId_grade_subject_key" ON "LeaderboardEntry"("userId", "grade", "subject");
|
||||
Reference in New Issue
Block a user