refactor!: change branch to registered branch scope

This commit is contained in:
Methapon Metanipat 2024-10-15 17:09:05 +07:00
parent 20b7e56a0d
commit 63a204b81a
3 changed files with 29 additions and 23 deletions

View file

@ -0,0 +1,11 @@
/*
Warnings:
- Added the required column `registeredBranchId` to the `Quotation` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Quotation" ADD COLUMN "registeredBranchId" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "Quotation" ADD CONSTRAINT "Quotation_registeredBranchId_fkey" FOREIGN KEY ("registeredBranchId") REFERENCES "Branch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;