-- CreateTable
CREATE TABLE "progress_report_deadlines" (
    "id" SERIAL NOT NULL,
    "progress_report_id" INTEGER NOT NULL,
    "deadline" DATE NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,
    "deleted_at" TIMESTAMP(3),

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

-- CreateIndex
CREATE INDEX "progress_report_deadlines_progress_report_id_idx" ON "progress_report_deadlines"("progress_report_id");

-- CreateIndex
CREATE INDEX "progress_report_deadlines_deadline_idx" ON "progress_report_deadlines"("deadline");

-- CreateIndex
CREATE INDEX "progress_report_deadlines_deleted_at_idx" ON "progress_report_deadlines"("deleted_at");

-- AddForeignKey
ALTER TABLE "progress_report_deadlines" ADD CONSTRAINT "progress_report_deadlines_progress_report_id_fkey" FOREIGN KEY ("progress_report_id") REFERENCES "progress_reports"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
