Skip to content

Commit 0fb1b91

Browse files
committed
Chore: Simplify the error message. Make it more actionable
1 parent 151469b commit 0fb1b91

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sqlmesh/core/plan/definition.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,7 @@ def _ensure_no_forward_only_revert(self) -> None:
679679
)
680680
):
681681
raise PlanError(
682-
f"Detected an existing version of model '{name}' that has been previously superseded by a forward-only change. "
683-
"To proceed with the change, restamp this model's definition to produce a new version."
682+
f"Attempted to revert to an unrevertable version of model '{name}'. Run `sqlmesh plan` again to mitigate the issue."
684683
)
685684

686685
def _ensure_no_broken_references(self) -> None:

tests/core/test_plan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def test_forward_only_revert_not_allowed(make_snapshot, mocker: MockerFixture):
275275

276276
with pytest.raises(
277277
PlanError,
278-
match=r"Detected an existing version of model 'a' that has been previously superseded by a forward-only change.*",
278+
match=r"Attempted to revert to an unrevertable version of model.*",
279279
):
280280
Plan(context_diff_mock, forward_only=True)
281281

0 commit comments

Comments
 (0)