chore: migration

This commit is contained in:
Methapon2001 2024-12-03 17:12:19 +07:00
parent 0bf7e9f740
commit 1ed7111eb9

View file

@ -0,0 +1,16 @@
/*
Warnings:
- You are about to drop the column `acceptedByUserId` on the `TaskOrder` table. All the data in the column will be lost.
- Added the required column `registeredBranchId` to the `TaskOrder` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "TaskOrder" DROP CONSTRAINT "TaskOrder_acceptedByUserId_fkey";
-- AlterTable
ALTER TABLE "TaskOrder" DROP COLUMN "acceptedByUserId",
ADD COLUMN "registeredBranchId" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "TaskOrder" ADD CONSTRAINT "TaskOrder_registeredBranchId_fkey" FOREIGN KEY ("registeredBranchId") REFERENCES "Branch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;