1
0
mirror of synced 2024-12-15 08:21:19 +01:00
Bayshore/prisma/migrations/20220729151830_ghost_trail/migration.sql

27 lines
767 B
MySQL
Raw Normal View History

-- AlterTable
ALTER TABLE "Car" ALTER COLUMN "stLoseBits" SET DEFAULT 0;
-- AlterTable
ALTER TABLE "CarCrown" ALTER COLUMN "trail" DROP DEFAULT;
-- CreateTable
CREATE TABLE "GhostTrail" (
"dbId" SERIAL NOT NULL,
"carId" INTEGER NOT NULL,
"area" INTEGER NOT NULL,
"ramp" INTEGER NOT NULL,
"path" INTEGER NOT NULL,
"trail" BYTEA NOT NULL,
"time" INTEGER,
"driveData" BYTEA,
"trendBinaryByArea" BYTEA,
"tunePower" INTEGER NOT NULL,
"tuneHandling" INTEGER NOT NULL,
"playedAt" INTEGER NOT NULL,
CONSTRAINT "GhostTrail_pkey" PRIMARY KEY ("dbId")
);
-- AddForeignKey
ALTER TABLE "GhostTrail" ADD CONSTRAINT "GhostTrail_carId_fkey" FOREIGN KEY ("carId") REFERENCES "Car"("carId") ON DELETE RESTRICT ON UPDATE CASCADE;