/*
  Warnings:

  - You are about to drop the column `programme_department_id` on the `programme` table. All the data in the column will be lost.
  - You are about to drop the column `districs` on the `regional_training_center` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE "programme" DROP CONSTRAINT "programme_programme_department_id_fkey";

-- AlterTable
ALTER TABLE "programme" DROP COLUMN "programme_department_id",
ADD COLUMN     "department_id" TEXT;

-- AlterTable
ALTER TABLE "programme_department" ADD COLUMN     "programme_id" TEXT NOT NULL DEFAULT E'0';

-- AlterTable
ALTER TABLE "regional_training_center" DROP COLUMN "districs";

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

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