1
0
mirror of synced 2024-12-13 15:31:10 +01:00
Bayshore/prisma/migrations/20220725043357_add_cargtwing/migration.sql
ghkkk090 6a70640279 fix custom color bug, fix GT wing (custom wing)
CAUTION :
DATABASE WILL GET NUKED, BACK UP FIRST

-add CarGTWing table
2022-07-25 15:23:12 +07:00

23 lines
746 B
SQL

-- AlterTable
ALTER TABLE "Car" ALTER COLUMN "stLoseBits" SET DEFAULT 0;
-- CreateTable
CREATE TABLE "CarGTWing" (
"dbId" SERIAL NOT NULL,
"carId" INTEGER NOT NULL,
"pillar" INTEGER NOT NULL DEFAULT 0,
"pillarMaterial" INTEGER NOT NULL DEFAULT 0,
"mainWing" INTEGER NOT NULL DEFAULT 0,
"mainWingColor" INTEGER NOT NULL DEFAULT 0,
"wingTip" INTEGER NOT NULL DEFAULT 0,
"material" INTEGER NOT NULL DEFAULT 0,
CONSTRAINT "CarGTWing_pkey" PRIMARY KEY ("dbId")
);
-- CreateIndex
CREATE UNIQUE INDEX "CarGTWing_carId_key" ON "CarGTWing"("carId");
-- AddForeignKey
ALTER TABLE "CarGTWing" ADD CONSTRAINT "CarGTWing_carId_fkey" FOREIGN KEY ("carId") REFERENCES "Car"("carId") ON DELETE RESTRICT ON UPDATE CASCADE;