From e51b9f3151dbf7ea69a670fb2d01e0d2581acb89 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 17 Oct 2026 11:01:55 -0400 Subject: [PATCH] chore: Export provisionFirstCollection, skip migration check when cloud hosted (#14116) --- server/commands/accountProvisioner.ts | 11 ++++++++++- server/utils/startup.ts | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/server/commands/accountProvisioner.ts b/server/commands/accountProvisioner.ts index 8b9103c48e..55a332e0f7 100644 --- a/server/commands/accountProvisioner.ts +++ b/server/commands/accountProvisioner.ts @@ -247,7 +247,16 @@ async function accountProvisioner( }; } -async function provisionFirstCollection( +/** + * Creates the default "Welcome" collection and onboarding documents for a + * newly created team. + * + * @param ctx the request context. + * @param team the team to provision the collection for. + * @param user the user that will be recorded as the creator. + * @returns a promise that resolves when the collection has been created. + */ +export async function provisionFirstCollection( ctx: APIContext, team: Team, user: User diff --git a/server/utils/startup.ts b/server/utils/startup.ts index 3b11a89b1e..2374bb9c92 100644 --- a/server/utils/startup.ts +++ b/server/utils/startup.ts @@ -73,6 +73,11 @@ export function configureChildHeapLimit(processCount: number) { * @returns a promise that resolves when the checks have completed successfully. */ export function checkPendingMigrations(): Promise { + // Migrations are run as a separate release step in the hosted service. + if (env.isCloudHosted) { + return Promise.resolve(); + } + return new Promise((resolve) => { const child = fork( path.join(__dirname, "..", "scripts", "checkMigrations.js"),