diff --git a/packages/server/src/migrations/functions/pluginCount.ts b/packages/server/src/migrations/functions/pluginCount.ts index 873a0967f8..a9dff9d7c8 100644 --- a/packages/server/src/migrations/functions/pluginCount.ts +++ b/packages/server/src/migrations/functions/pluginCount.ts @@ -1,12 +1,7 @@ import { tenancy, logging } from "@budibase/backend-core" import { plugins } from "@budibase/pro" -import env from "../../environment" export const run = async () => { - // only a self hosted op - if (!env.SELF_HOSTED) { - return - } try { await tenancy.doInTenant(tenancy.DEFAULT_TENANT_ID, async () => { await plugins.checkPluginQuotas() diff --git a/packages/server/src/migrations/index.ts b/packages/server/src/migrations/index.ts index 0e60df546f..8fcdf1e311 100644 --- a/packages/server/src/migrations/index.ts +++ b/packages/server/src/migrations/index.ts @@ -70,12 +70,14 @@ export const buildMigrations = () => { break } case MigrationName.PLUGIN_COUNT: { - serverMigrations.push({ - ...definition, - fn: pluginCount.run, - silent: !!env.SELF_HOSTED, - preventRetry: false, - }) + if (env.SELF_HOSTED) { + serverMigrations.push({ + ...definition, + fn: pluginCount.run, + silent: !!env.SELF_HOSTED, + preventRetry: false, + }) + } } } }