diff --git a/packages/server/src/appMigrations/appMigrationMetadata.ts b/packages/server/src/appMigrations/appMigrationMetadata.ts index 971dde1e7a..1662a6f225 100644 --- a/packages/server/src/appMigrations/appMigrationMetadata.ts +++ b/packages/server/src/appMigrations/appMigrationMetadata.ts @@ -25,8 +25,8 @@ export async function getAppMigrationVersion(appId: string): Promise { let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey) - // We don't want to cache in dev or QA in order to be able to tweak it - if (metadata && !env.isDev() && !env.isQA()) { + // returned cached version if we found one + if (metadata?.version) { return metadata.version } diff --git a/packages/server/src/startup/index.ts b/packages/server/src/startup/index.ts index 0e08075698..83d92443c6 100644 --- a/packages/server/src/startup/index.ts +++ b/packages/server/src/startup/index.ts @@ -121,8 +121,6 @@ export async function startup( // app migrations and automations on other service if (automationsEnabled()) { queuePromises.push(automations.init()) - } - if (apiEnabled()) { queuePromises.push(appMigrations.init()) } queuePromises.push(initPro())