Skip to content

The open alternative to Salesforce, designed for AI.

Fix identify remaining entities command to cover soft-deleted rows (#17304)

Paul Rastoin54a9a1087b56
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/1-16/1-16-identify-remaining-entities-metadata.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/1-16/1-16-identify-remaining-entities-metadata.command.ts
index e563c74a43a..a81fa43ede8 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/1-16/1-16-identify-remaining-entities-metadata.command.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/1-16/1-16-identify-remaining-entities-metadata.command.ts
@@ -101,6 +101,7 @@ export class IdentifyRemainingEntitiesMetadataCommand extends ActiveOrSuspendedW
workspaceId,
applicationId: IsNull(),
},
+ withDeleted: true,
});
if (entitiesWithoutApplicationId.length === 0) {
@@ -164,6 +165,7 @@ export class IdentifyRemainingEntitiesMetadataCommand extends ActiveOrSuspendedW
workspaceId,
applicationId: IsNull(),
},
+ withDeleted: true,
});
if (viewSortsWithoutApplicationId.length === 0) {