/*
  Warnings:

  - You are about to drop the column `workStatus` on the `RequestWork` table. All the data in the column will be lost.

*/
-- AlterTable
ALTER TABLE "RequestWork" DROP COLUMN "workStatus";

-- CreateTable
CREATE TABLE "RequestWorkStepStatus" (
    "step" INTEGER NOT NULL,
    "workStatus" "RequestWorkStatus" NOT NULL DEFAULT 'Pending',
    "requestWorkId" TEXT NOT NULL,

    CONSTRAINT "RequestWorkStepStatus_pkey" PRIMARY KEY ("step","requestWorkId")
);

-- AddForeignKey
ALTER TABLE "RequestWorkStepStatus" ADD CONSTRAINT "RequestWorkStepStatus_requestWorkId_fkey" FOREIGN KEY ("requestWorkId") REFERENCES "RequestWork"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
