chore: add missing migration for RoutingFormResponseDenormalized (#21388)
* chore: add missing migration for RoutingFormResponseDenormalized * more changes * remove cascade deleting * update migration * updates * update * update schema * update * update * update * update
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "RoutingFormResponseDenormalized" DROP CONSTRAINT "RoutingFormResponseDenormalized_eventTypeId_fkey";
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "App_RoutingForms_FormResponse_routedToBookingUid_idx" ON "App_RoutingForms_FormResponse"("routedToBookingUid");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "DelegationCredential_enabled_idx" ON "DelegationCredential"("enabled");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "RoutingFormResponseField" ADD CONSTRAINT "RoutingFormResponseField_responseId_fkey" FOREIGN KEY ("responseId") REFERENCES "RoutingFormResponseDenormalized"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -1132,14 +1132,14 @@ model App_RoutingForms_FormResponse {
|
||||
}
|
||||
|
||||
model RoutingFormResponseField {
|
||||
id Int @id @default(autoincrement())
|
||||
responseId Int?
|
||||
id Int @id @default(autoincrement())
|
||||
responseId Int
|
||||
fieldId String
|
||||
valueString String?
|
||||
valueNumber Decimal?
|
||||
valueStringArray String[]
|
||||
response App_RoutingForms_FormResponse? @relation(fields: [responseId], references: [id], map: "RoutingFormResponseField_response_fkey")
|
||||
denormalized RoutingFormResponseDenormalized? @relation("DenormalizedResponseToFields", fields: [responseId], references: [id])
|
||||
response App_RoutingForms_FormResponse @relation(fields: [responseId], references: [id], map: "RoutingFormResponseField_response_fkey", onDelete: Cascade)
|
||||
denormalized RoutingFormResponseDenormalized @relation("DenormalizedResponseToFields", fields: [responseId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([responseId])
|
||||
@@index([fieldId])
|
||||
|
||||
Reference in New Issue
Block a user