-- CreateTable
CREATE TABLE "programme_document" (
    "id" TEXT NOT NULL,
    "programme_id" TEXT NOT NULL,
    "document_url" TEXT NOT NULL,
    "user_id" TEXT NOT NULL,
    "client_ip" TEXT,
    "is_deleted" BOOLEAN NOT NULL DEFAULT false,
    "created_date_time" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

    PRIMARY KEY ("id")
);

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

-- AddForeignKey
ALTER TABLE "programme_document" ADD FOREIGN KEY ("user_id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE;
