Add command to tag workspace as suspended or as deleted (#9610)

In this PR:
- remove old versions upgrade commands
- add a 0.40 upgrade command to loop over all INACTIVE workspaces and
either: update to SUSPENDED (if workspaceSchema exists), update them to
SUSPENDED + deletedAt (if workspaceSchema does not exist anymore)

Note: why updating the deleted one to SUSPENDED? Because I plan to
remove INACTIVE case in the enum in 0.41

Tests made on production like database:
- dry-mode
- singleWorkspaceId
- 3 cases : suspended, deleted+suspended, deleted+suspended+delete all
data
This commit is contained in:
Charles Bochet
2025-01-14 18:23:42 +01:00
committed by GitHub
parent 87be542185
commit 42ddc09f74
26 changed files with 290 additions and 2087 deletions

View File

@ -28,12 +28,12 @@ export class CommandLogger {
this.logger.error(message, stack, context);
}
warn(message: string, context?: string) {
this.logger.warn(message, context);
warn(message: string, ...optionalParams: [...any, string?]) {
this.logger.warn(message, ...optionalParams);
}
debug(message: string, context?: string) {
this.logger.debug(message, context);
debug(message: string, ...optionalParams: [...any, string?]) {
this.logger.debug(message, ...optionalParams);
}
verbose(message: string, ...optionalParams: [...any, string?]) {