chore: update constraints
This commit is contained in:
parent
ca8aec6c4f
commit
f3e4526c16
2 changed files with 13 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
@ -1081,14 +1081,14 @@ model QuotationWorker {
|
||||||
code String
|
code String
|
||||||
employee Employee @relation(fields: [employeeId], references: [id])
|
employee Employee @relation(fields: [employeeId], references: [id])
|
||||||
employeeId String
|
employeeId String
|
||||||
quotation Quotation @relation(fields: [quotationId], references: [id])
|
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
||||||
quotationId String
|
quotationId String
|
||||||
}
|
}
|
||||||
|
|
||||||
model QuotationProductServiceList {
|
model QuotationProductServiceList {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
quotationId String
|
quotationId String
|
||||||
quotation Quotation @relation(fields: [quotationId], references: [id])
|
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
order Int
|
order Int
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue