Files
var-monorepo/packages/database/prisma/migrations/20250221165414_/migration.sql
2025-02-21 22:51:10 +01:00

18 lines
573 B
SQL

/*
Warnings:
- Made the column `eventId` on table `Participant` required. This step will fail if there are existing NULL values in that column.
*/
-- DropForeignKey
ALTER TABLE "Participant" DROP CONSTRAINT "Participant_eventId_fkey";
-- AlterTable
ALTER TABLE "Event" ALTER COLUMN "maxParticipants" SET DEFAULT 0;
-- AlterTable
ALTER TABLE "Participant" ALTER COLUMN "eventId" SET NOT NULL;
-- AddForeignKey
ALTER TABLE "Participant" ADD CONSTRAINT "Participant_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "Event"("id") ON DELETE RESTRICT ON UPDATE CASCADE;