Skip to content

Commit d953280

Browse files
committed
fix: include pre/post when cloning
1 parent 7cfddd8 commit d953280

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sqlmesh/core/snapshot/evaluator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ def create_snapshot(
867867
rendered_physical_properties=rendered_physical_properties,
868868
allow_destructive_snapshots=allow_destructive_snapshots,
869869
allow_additive_snapshots=allow_additive_snapshots,
870+
run_pre_post_statements=True,
870871
)
871872
else:
872873
is_table_deployable = deployability_index.is_deployable(snapshot)
@@ -1026,6 +1027,7 @@ def _clone_snapshot_in_dev(
10261027
rendered_physical_properties: t.Dict[str, exp.Expression],
10271028
allow_destructive_snapshots: t.Set[str],
10281029
allow_additive_snapshots: t.Set[str],
1030+
run_pre_post_statements: bool = False,
10291031
) -> None:
10301032
adapter = self.get_adapter(snapshot.model.gateway)
10311033

@@ -1048,6 +1050,7 @@ def _clone_snapshot_in_dev(
10481050
rendered_physical_properties=rendered_physical_properties,
10491051
allow_destructive_snapshots=allow_destructive_snapshots,
10501052
allow_additive_snapshots=allow_additive_snapshots,
1053+
run_pre_post_statements=run_pre_post_statements,
10511054
)
10521055
except Exception:
10531056
adapter.drop_table(target_table_name)

0 commit comments

Comments
 (0)