You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: packages/twenty-server/src/database/commands/command-runners/__tests__/__snapshots__/upgrade.command-runner.spec.ts.snap
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,14 @@ exports[`UpgradeCommandRunner Workspace upgrade should fail when current version
8
8
9
9
exports[`UpgradeCommandRunner Workspace upgrade should fail when previous version is not found 1`] =`[Error: No previous version found for version 1.0.0. Please review the "allCommands" record. Available versions are: 1.0.0, 2.0.0]`;
10
10
11
-
exports[`UpgradeCommandRunner Workspace upgrade should fail when workspace version is not defined 1`] =`[Error: WORKSPACE_VERSION_NOT_DEFINED workspace=workspace_0]`;
12
-
13
-
exports[`UpgradeCommandRunner Workspace upgrade should fail when workspace version is not equal to fromVersion 1`] =`[Error: WORKSPACE_VERSION_MISSMATCH Upgrade for workspace workspace_0 failed as its version is beneath fromWorkspaceVersion=1.0.0]`;
14
-
15
-
exports[`UpgradeCommandRunner should run upgrade command with failing and successful workspaces 1`] =`[Error: WORKSPACE_VERSION_MISSMATCH Upgrade for workspace outated_version_workspace failed as its version is beneath fromWorkspaceVersion=1.0.0]`;
16
-
17
-
exports[`UpgradeCommandRunner should run upgrade command with failing and successful workspaces 2`] =`[Error: Received invalid version: invalid 1.0.0]`;
18
-
19
-
exports[`UpgradeCommandRunner should run upgrade command with failing and successful workspaces 3`] =`[Error: WORKSPACE_VERSION_NOT_DEFINED workspace=null_version_workspace]`;
11
+
exports[`UpgradeCommandRunner Workspace upgrade should fail when workspace version is not defined 1`] =`
12
+
[Error: Unable to run the upgrade command. Aborting the upgrade process.
13
+
Please ensure that all workspaces are on at least the previous minor version (1.0.0).
14
+
If any workspaces are not on the previous minor version, roll back to that version and run the upgrade command again.]
15
+
`;
16
+
17
+
exports[`UpgradeCommandRunner Workspace upgrade should fail when workspace version is not equal to fromVersion 1`] =`
18
+
[Error: Unable to run the upgrade command. Aborting the upgrade process.
19
+
Please ensure that all workspaces are on at least the previous minor version (1.0.0).
20
+
If any workspaces are not on the previous minor version, roll back to that version and run the upgrade command again.]
0 commit comments