1
0
mirror of https://github.com/shiroikitsu8/Bayshore_6r_legacy.git synced 2024-12-12 15:41:05 +01:00
Bayshore_6r_legacy/prisma/migrations/20220716210527_timeattack3/migration.sql

17 lines
669 B
MySQL
Raw Normal View History

/*
Warnings:
- You are about to drop the column `userId` on the `TimeAttackRecord` table. All the data in the column will be lost.
- Added the required column `carId` to the `TimeAttackRecord` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "TimeAttackRecord" DROP CONSTRAINT "TimeAttackRecord_userId_fkey";
-- AlterTable
ALTER TABLE "TimeAttackRecord" DROP COLUMN "userId",
ADD COLUMN "carId" INTEGER NOT NULL;
-- AddForeignKey
ALTER TABLE "TimeAttackRecord" ADD CONSTRAINT "TimeAttackRecord_carId_fkey" FOREIGN KEY ("carId") REFERENCES "Car"("carId") ON DELETE RESTRICT ON UPDATE CASCADE;