feat: update structure
This commit is contained in:
parent
b999c9dd46
commit
353d372dd8
3 changed files with 43 additions and 3 deletions
|
|
@ -0,0 +1,16 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Quotation" ALTER COLUMN "quotationStatus" SET DEFAULT 'PaymentWait';
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuotationProductServiceWorker" (
|
||||
"productServiceId" TEXT NOT NULL,
|
||||
"employeeId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "QuotationProductServiceWorker_pkey" PRIMARY KEY ("productServiceId","employeeId")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuotationProductServiceWorker" ADD CONSTRAINT "QuotationProductServiceWorker_productServiceId_fkey" FOREIGN KEY ("productServiceId") REFERENCES "QuotationProductServiceList"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuotationProductServiceWorker" ADD CONSTRAINT "QuotationProductServiceWorker_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "Employee"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE "QuotationProductServiceWorker" DROP CONSTRAINT "QuotationProductServiceWorker_employeeId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "QuotationProductServiceWorker" DROP CONSTRAINT "QuotationProductServiceWorker_productServiceId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuotationProductServiceWorker" ADD CONSTRAINT "QuotationProductServiceWorker_productServiceId_fkey" FOREIGN KEY ("productServiceId") REFERENCES "QuotationProductServiceList"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuotationProductServiceWorker" ADD CONSTRAINT "QuotationProductServiceWorker_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "Employee"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue