chore: update constraints

This commit is contained in:
Methapon Metanipat 2024-10-01 15:41:23 +07:00
parent ca8aec6c4f
commit f3e4526c16
2 changed files with 13 additions and 2 deletions

View file

@ -0,0 +1,11 @@
-- DropForeignKey
ALTER TABLE "QuotationProductServiceList" DROP CONSTRAINT "QuotationProductServiceList_quotationId_fkey";
-- DropForeignKey
ALTER TABLE "QuotationWorker" DROP CONSTRAINT "QuotationWorker_quotationId_fkey";
-- AddForeignKey
ALTER TABLE "QuotationWorker" ADD CONSTRAINT "QuotationWorker_quotationId_fkey" FOREIGN KEY ("quotationId") REFERENCES "Quotation"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "QuotationProductServiceList" ADD CONSTRAINT "QuotationProductServiceList_quotationId_fkey" FOREIGN KEY ("quotationId") REFERENCES "Quotation"("id") ON DELETE CASCADE ON UPDATE CASCADE;