-- DropForeignKey
ALTER TABLE "bracket_matchups" DROP CONSTRAINT "bracket_matchups_matchId_fkey";

-- DropForeignKey
ALTER TABLE "elo_snapshots" DROP CONSTRAINT "elo_snapshots_matchId_fkey";

-- DropForeignKey
ALTER TABLE "matches" DROP CONSTRAINT "matches_eventId_fkey";

-- DropForeignKey
ALTER TABLE "partnership_games" DROP CONSTRAINT "partnership_games_matchId_fkey";

-- AddForeignKey
ALTER TABLE "bracket_matchups" ADD CONSTRAINT "bracket_matchups_matchId_fkey" FOREIGN KEY ("matchId") REFERENCES "matches"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "matches" ADD CONSTRAINT "matches_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "events"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "elo_snapshots" ADD CONSTRAINT "elo_snapshots_matchId_fkey" FOREIGN KEY ("matchId") REFERENCES "matches"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "partnership_games" ADD CONSTRAINT "partnership_games_matchId_fkey" FOREIGN KEY ("matchId") REFERENCES "matches"("id") ON DELETE CASCADE ON UPDATE CASCADE;
