chore: migration
This commit is contained in:
parent
fcb2e97b45
commit
371514c5f6
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
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;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue