diff --git a/prisma/migrations/20241203101211_change_field/migration.sql b/prisma/migrations/20241203101211_change_field/migration.sql new file mode 100644 index 0000000..05ef58b --- /dev/null +++ b/prisma/migrations/20241203101211_change_field/migration.sql @@ -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;