/*
  Warnings:

  - You are about to drop the column `areas` on the `Brief` table. All the data in the column will be lost.
  - Added the required column `pilotObjective` to the `Brief` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "Brief" DROP COLUMN "areas",
ADD COLUMN     "confidentialityAgreements" TEXT,
ADD COLUMN     "nextSteps" TEXT,
ADD COLUMN     "pilotObjective" TEXT NOT NULL,
ADD COLUMN     "processRisks" TEXT,
ADD COLUMN     "sensitivePillars" JSONB NOT NULL DEFAULT '[]',
ADD COLUMN     "sites" JSONB NOT NULL DEFAULT '[]',
ADD COLUMN     "targetPopulation" TEXT;

-- CreateTable
CREATE TABLE "BriefParticipant" (
    "id" TEXT NOT NULL,
    "briefId" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "role" TEXT NOT NULL,
    "email" TEXT,

    CONSTRAINT "BriefParticipant_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "BriefKpi" (
    "id" TEXT NOT NULL,
    "briefId" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "target" TEXT,

    CONSTRAINT "BriefKpi_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "BriefParticipant" ADD CONSTRAINT "BriefParticipant_briefId_fkey" FOREIGN KEY ("briefId") REFERENCES "Brief"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "BriefKpi" ADD CONSTRAINT "BriefKpi_briefId_fkey" FOREIGN KEY ("briefId") REFERENCES "Brief"("id") ON DELETE CASCADE ON UPDATE CASCADE;
