Improve upgrade command and prepare 1.5 release (#14325)

In this PR:
- refactor the upgrade command / upgrade command runner to keep upgrade
command as light as possible (all wrapping logic should go to upgrade
command runner)
- prevent any upgrade if there is at least one workspace.version <
previsousVersion ==> this leads to corrupted state where only core
migrations are run if the self-hoster is skipping a version
This commit is contained in:
Charles Bochet
2025-09-05 15:58:17 +02:00
committed by GitHub
parent d5ef4cbbff
commit f802294c84
11 changed files with 264 additions and 246 deletions
@@ -4,7 +4,6 @@ import { TypeOrmModule } from '@nestjs/typeorm';
import { CronRegisterAllCommand } from 'src/database/commands/cron-register-all.command';
import { ConfirmationQuestion } from 'src/database/commands/questions/confirmation.question';
import { UpgradeVersionCommandModule } from 'src/database/commands/upgrade-version-command/upgrade-version-command.module';
import { MigrateViewsToCoreCommand } from 'src/database/commands/views-migration/migrate-views-to-core.command';
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
import { ApiKeyModule } from 'src/engine/core-modules/api-key/api-key.module';
import { DomainManagerModule } from 'src/engine/core-modules/domain-manager/domain-manager.module';
@@ -50,7 +49,6 @@ import { DataSeedWorkspaceCommand } from './data-seed-dev-workspace.command';
],
providers: [
DataSeedWorkspaceCommand,
MigrateViewsToCoreCommand,
ConfirmationQuestion,
CronRegisterAllCommand,
],