1
0
mirror of synced 2024-12-14 07:42:55 +01:00
Bayshore/prisma/migrations/20220729074502_car_crown/migration.sql
2022-07-29 16:13:21 +07:00

18 lines
519 B
SQL

-- AlterTable
ALTER TABLE "Car" ALTER COLUMN "stLoseBits" SET DEFAULT 0;
-- CreateTable
CREATE TABLE "CarCrown" (
"dbId" SERIAL NOT NULL,
"carId" INTEGER NOT NULL,
"area" INTEGER NOT NULL,
"ramp" INTEGER NOT NULL,
"path" INTEGER NOT NULL,
"trail" BIGINT NOT NULL DEFAULT 0,
CONSTRAINT "CarCrown_pkey" PRIMARY KEY ("dbId")
);
-- AddForeignKey
ALTER TABLE "CarCrown" ADD CONSTRAINT "CarCrown_carId_fkey" FOREIGN KEY ("carId") REFERENCES "Car"("carId") ON DELETE RESTRICT ON UPDATE CASCADE;