Fixes before deploy (#1167)

This commit is contained in:
Charles Bochet
2023-08-11 00:09:52 +02:00
committed by GitHub
parent 5300952b1a
commit fb0f9b7807
10 changed files with 75 additions and 44 deletions

View File

@ -27,12 +27,6 @@ CREATE UNIQUE INDEX "views_workspaceId_type_objectId_name_key" ON "views"("works
-- CreateIndex
CREATE UNIQUE INDEX "viewFields_workspaceId_viewId_objectName_fieldName_key" ON "viewFields"("workspaceId", "viewId", "objectName", "fieldName");
-- AddForeignKey
-- ALTER TABLE "pipeline_progresses" ADD CONSTRAINT "pipeline_progresses_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "companies"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
-- ALTER TABLE "pipeline_progresses" ADD CONSTRAINT "pipeline_progresses_personId_fkey" FOREIGN KEY ("personId") REFERENCES "people"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "views" ADD CONSTRAINT "views_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "workspaces"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -282,7 +282,7 @@ model Person {
/// @Validator.IsOptional()
avatarUrl String?
company Company? @relation(fields: [companyId], references: [id])
company Company? @relation(fields: [companyId], references: [id], onDelete: SetNull)
companyId String?
/// @TypeGraphQL.omit(input: true, output: true)
workspace Workspace @relation(fields: [workspaceId], references: [id])
@ -407,10 +407,10 @@ model ActivityTarget {
workspaceId String
personId String?
person Person? @relation(fields: [personId], references: [id])
person Person? @relation(fields: [personId], references: [id], onDelete: Cascade)
companyId String?
company Company? @relation(fields: [companyId], references: [id])
company Company? @relation(fields: [companyId], references: [id], onDelete: Cascade)
/// @TypeGraphQL.omit(input: true, output: true)
deletedAt DateTime?
@ -514,10 +514,10 @@ model PipelineProgress {
updatedAt DateTime @updatedAt
companyId String?
company Company? @relation(fields: [companyId], references: [id])
company Company? @relation(fields: [companyId], references: [id], onDelete: Cascade)
personId String?
person Person? @relation(fields: [personId], references: [id])
person Person? @relation(fields: [personId], references: [id], onDelete: Cascade)
@@map("pipeline_progresses")
}