/*
  Warnings:

  - You are about to drop the column `programme_sessionId` on the `programme_candidate` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE "programme_candidate" DROP CONSTRAINT "programme_candidate_programme_sessionId_fkey";

-- AlterTable
ALTER TABLE "programme_candidate" DROP COLUMN "programme_sessionId";

-- CreateTable
CREATE TABLE "_programme_candidateToprogramme_session" (
    "A" TEXT NOT NULL,
    "B" TEXT NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "_programme_candidateToprogramme_session_AB_unique" ON "_programme_candidateToprogramme_session"("A", "B");

-- CreateIndex
CREATE INDEX "_programme_candidateToprogramme_session_B_index" ON "_programme_candidateToprogramme_session"("B");

-- AddForeignKey
ALTER TABLE "_programme_candidateToprogramme_session" ADD FOREIGN KEY ("A") REFERENCES "programme_candidate"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "_programme_candidateToprogramme_session" ADD FOREIGN KEY ("B") REFERENCES "programme_session"("id") ON DELETE CASCADE ON UPDATE CASCADE;
