1
0
mirror of https://github.com/shiroikitsu8/Bayshore_6r_legacy.git synced 2024-12-05 04:18:00 +01:00
Bayshore_6r_legacy/prisma/migrations/20220716203307_timeattack/migration.sql

21 lines
674 B
MySQL
Raw Normal View History

-- CreateTable
CREATE TABLE "TimeAttackRecord" (
"dbId" SERIAL NOT NULL,
"userId" INTEGER NOT NULL,
"model" INTEGER NOT NULL,
"time" INTEGER NOT NULL,
"course" INTEGER NOT NULL,
"section1Time" INTEGER NOT NULL,
"section2Time" INTEGER NOT NULL,
"section3Time" INTEGER NOT NULL,
"section4Time" INTEGER NOT NULL,
"section5Time" INTEGER,
"section6Time" INTEGER,
"section7Time" INTEGER,
CONSTRAINT "TimeAttackRecord_pkey" PRIMARY KEY ("dbId")
);
-- AddForeignKey
ALTER TABLE "TimeAttackRecord" ADD CONSTRAINT "TimeAttackRecord_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;