From 2ea62317d8fd960bfbd42a46a75d67ffc8a96900 Mon Sep 17 00:00:00 2001 From: martmull Date: Fri, 10 Apr 2026 09:47:18 +0200 Subject: [PATCH] Pre-sync only pre-install-logic-function (#19534) as title --- .../application-manifest-migration.service.ts | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts index 9c34766ef22..512c962ad1b 100644 --- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts +++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts @@ -62,34 +62,16 @@ export class ApplicationManifestMigrationService { ); } - const defaultRoleManifest = manifest.roles.find( - (role) => - role.universalIdentifier === - manifest.application.defaultRoleUniversalIdentifier, - ); - - // Pared-down manifest: only the pre-install logic function, every other - // entity array intentionally empty. Combined with - // inferDeletionFromMissingEntities: false below, this produces a purely + // Will be sync with inferDeletionFromMissingEntities: false to produces a purely // additive migration that registers the pre-install logic function without // touching any previously-synced metadata (important on upgrades). - const strippedDefaultRoleManifest = isDefined(defaultRoleManifest) - ? { - ...defaultRoleManifest, - objectPermissions: [], - fieldPermissions: [], - } - : undefined; - const preInstallOnlyManifest: Manifest = { application: manifest.application, objects: [], fields: [], logicFunctions: [preInstallLogicFunctionManifest], frontComponents: [], - roles: isDefined(strippedDefaultRoleManifest) - ? [strippedDefaultRoleManifest] - : [], + roles: [], skills: [], agents: [], publicAssets: [], @@ -165,12 +147,6 @@ export class ApplicationManifestMigrationService { ); } - await this.syncDefaultRoleAndSettingsCustomTab({ - manifest, - workspaceId, - ownerFlatApplication, - }); - this.logger.log( `Pre-install logic function synced for application ${ownerFlatApplication.universalIdentifier}`, );