-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rewrite problem page (#143)
- Loading branch information
Showing
7 changed files
with
346 additions
and
385 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
prisma/migrations/20240925092027_refine_problem_session/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- DropTable | ||
PRAGMA foreign_keys=off; | ||
DROP TABLE "ProblemSession"; | ||
PRAGMA foreign_keys=on; | ||
|
||
-- CreateTable | ||
CREATE TABLE "ProblemSession" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" DATETIME NOT NULL, | ||
"userId" TEXT NOT NULL, | ||
"courseId" TEXT NOT NULL, | ||
"lectureId" TEXT NOT NULL, | ||
"problemId" TEXT NOT NULL, | ||
"problemVariablesSeed" TEXT NOT NULL, | ||
"problemType" TEXT NOT NULL, | ||
"traceItemIndex" INTEGER NOT NULL, | ||
"elapsedMilliseconds" INTEGER NOT NULL DEFAULT 0, | ||
"completedAt" DATETIME, | ||
CONSTRAINT "ProblemSession_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE | ||
); | ||
CREATE INDEX "ProblemSession_userId_courseId_lectureId_problemId_completedAt_idx" ON "ProblemSession"("userId", "courseId", "lectureId", "problemId", "completedAt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
310 changes: 0 additions & 310 deletions
310
src/app/(withAuth)/courses/[courseId]/lectures/[lectureId]/problems/[problemId]/Problems.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.