From 54a9a1087b5662c1945e1a2b361e5fd2741ffa01 Mon Sep 17 00:00:00 2001 From: Paul Rastoin <45004772+prastoin@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:36:26 +0100 Subject: [PATCH] Fix identify remaining entities command to cover soft-deleted rows (#17304) # Introduction Some entities aren't passing the migration due to not covering the soft deleted rows ## Entities that implements soft deletion Inserted with universal programmatically - rowLevelPermissionPredicate - rowLevelPermissionPredicateGroup - pageLayout - pageLayoutTab - pageLayoutWidget Legacy might contains null - viewFilterGroup - serverlessFunction - viewSort --- .../1-16/1-16-identify-remaining-entities-metadata.command.ts | 2 ++ 1 file changed, 2 insertions(+) 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 e563c74a43..a81fa43ede 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) {