17 lines
798 B
MySQL
17 lines
798 B
MySQL
|
|
-- 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;
|