From 1edce5088c2fae037252a6258594e4f6ded87c8e Mon Sep 17 00:00:00 2001 From: Marie <51697796+ijreilly@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:35:13 +0100 Subject: [PATCH] Flush cache before and after upgrade for self-hosts (#17800) as per title --- packages/twenty-docker/twenty/entrypoint.sh | 3 +++ .../command-runners/workspaces-migration.command-runner.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/twenty-docker/twenty/entrypoint.sh b/packages/twenty-docker/twenty/entrypoint.sh index 70d804ea16..9b4aaf4d65 100755 --- a/packages/twenty-docker/twenty/entrypoint.sh +++ b/packages/twenty-docker/twenty/entrypoint.sh @@ -17,7 +17,10 @@ setup_and_migrate_db() { yarn database:migrate:prod fi + yarn command:prod cache:flush yarn command:prod upgrade + yarn command:prod cache:flush + echo "Successfully migrated DB!" } diff --git a/packages/twenty-server/src/database/commands/command-runners/workspaces-migration.command-runner.ts b/packages/twenty-server/src/database/commands/command-runners/workspaces-migration.command-runner.ts index 2509323510..abb59c428e 100644 --- a/packages/twenty-server/src/database/commands/command-runners/workspaces-migration.command-runner.ts +++ b/packages/twenty-server/src/database/commands/command-runners/workspaces-migration.command-runner.ts @@ -135,7 +135,7 @@ export abstract class WorkspacesMigrationCommandRunner< for (const [index, workspaceId] of workspaceIdsToProcess.entries()) { this.logger.log( - `Running command on workspace ${workspaceId} ${index + 1}/${workspaceIdsToProcess.length}`, + `Upgrading workspace ${workspaceId} ${index + 1}/${workspaceIdsToProcess.length}`, ); try {