/*
  Warnings:

  - You are about to drop the `programme_department` table. If the table is not empty, all the data it contains will be lost.

*/
-- DropForeignKey
ALTER TABLE "programme_department" DROP CONSTRAINT "programme_department_department_id_fkey";

-- DropForeignKey
ALTER TABLE "programme_department" DROP CONSTRAINT "programme_department_programme_id_fkey";

-- DropIndex
DROP INDEX "programme.rtc_district_id_unique";

-- DropTable
DROP TABLE "programme_department";

-- CreateTable
CREATE TABLE "invite_department" (
    "id" TEXT NOT NULL,
    "programme_id" TEXT NOT NULL,
    "department_id" TEXT NOT NULL,
    "is_deleted" BOOLEAN NOT NULL DEFAULT false,

    PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "invite_department" ADD FOREIGN KEY ("department_id") REFERENCES "department"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "invite_department" ADD FOREIGN KEY ("programme_id") REFERENCES "programme"("id") ON DELETE CASCADE ON UPDATE CASCADE;
