1
0
mirror of synced 2024-12-13 15:31:10 +01:00
Bayshore/prisma/migrations/20220812022623_ocm_2/migration.sql
2022-08-15 10:47:34 +07:00

18 lines
566 B
SQL

-- AlterTable
ALTER TABLE "Car" ALTER COLUMN "stLoseBits" SET DEFAULT 0;
-- CreateTable
CREATE TABLE "OCMPeriod" (
"dbId" SERIAL NOT NULL,
"competitionDbId" INTEGER NOT NULL,
"competitionId" INTEGER NOT NULL,
"periodId" INTEGER NOT NULL,
"startAt" INTEGER NOT NULL,
"closeAt" INTEGER NOT NULL,
CONSTRAINT "OCMPeriod_pkey" PRIMARY KEY ("dbId")
);
-- AddForeignKey
ALTER TABLE "OCMPeriod" ADD CONSTRAINT "OCMPeriod_competitionDbId_fkey" FOREIGN KEY ("competitionDbId") REFERENCES "OCMEvent"("dbId") ON DELETE RESTRICT ON UPDATE CASCADE;