Skip to content

Commit 75c80cb

Browse files
authored
Chore: Suggest a command to run when raising an error about the need for migration (#1368)
1 parent 8e86e94 commit 75c80cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/guides/migrations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In this scenario, the project's metadata format needs to be migrated.
1010

1111
```bash
1212
> sqlmesh plan my_dev
13-
Error: SQLMesh (local) is using version '2' which is ahead of '1' (remote). Please run a migration.
13+
Error: SQLMesh (local) is using version '2' which is ahead of '1' (remote). Please run a migration ('sqlmesh migrate' command).
1414
```
1515

1616
### Installed version is older than metadata format
@@ -28,4 +28,4 @@ The project metadata can be migrated to the latest metadata format using SQLMesh
2828
> sqlmesh migrate
2929
```
3030

31-
Migrating project metadata will affect all users of the project. Please consult your SQLMesh administrator before running the migrate command.
31+
Migrating project metadata will affect all users of the project. Please consult your SQLMesh administrator before running the migrate command.

sqlmesh/core/state_sync/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def get_versions(self, validate: bool = True) -> Versions:
148148
def raise_error(lib: str, local: str | int, remote: str | int, ahead: bool = False) -> None:
149149
if ahead:
150150
raise SQLMeshError(
151-
f"{lib} (local) is using version '{local}' which is ahead of '{remote}' (remote). Please run a migration."
151+
f"{lib} (local) is using version '{local}' which is ahead of '{remote}' (remote). Please run a migration ('sqlmesh migrate' command)."
152152
)
153153
raise SQLMeshError(
154154
f"{lib} (local) is using version '{local}' which is behind '{remote}' (remote). Please upgrade {lib}."

0 commit comments

Comments
 (0)