Skip to content

Commit f7e0e19

Browse files
authored
Fix: Missing upstream snapshot in the v0023 migration script (#1425)
1 parent e2f498b commit f7e0e19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sqlmesh/migrations/v0023_fix_added_models_with_forward_only_parents.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def migrate(state_sync: t.Any) -> None:
4545
has_paused_forward_only_parent = False
4646
if is_breaking and not has_previous_versions:
4747
for upstream_id in dag.upstream(snapshot_id):
48+
if upstream_id not in snapshot_mapping:
49+
continue
4850
upstream_snapshot = snapshot_mapping[upstream_id]
4951
upstream_change_category = upstream_snapshot.get("change_category")
5052
is_forward_only_upstream = upstream_change_category == 3

0 commit comments

Comments
 (0)