@@ -279,6 +279,7 @@ def demote(
279279 target_snapshots : t .Iterable [Snapshot ],
280280 environment_naming_info : EnvironmentNamingInfo ,
281281 snapshots : t .Optional [t .Dict [SnapshotId , Snapshot ]] = None ,
282+ table_mapping : t .Optional [t .Dict [str , str ]] = None ,
282283 deployability_index : t .Optional [DeployabilityIndex ] = None ,
283284 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]] = None ,
284285 ) -> None :
@@ -293,7 +294,12 @@ def demote(
293294 concurrent_apply_to_snapshots (
294295 target_snapshots ,
295296 lambda s : self ._demote_snapshot (
296- s , environment_naming_info , snapshots , deployability_index , on_complete
297+ s ,
298+ environment_naming_info ,
299+ snapshots ,
300+ table_mapping ,
301+ deployability_index ,
302+ on_complete ,
297303 ),
298304 self .ddl_concurrent_tasks ,
299305 )
@@ -1019,6 +1025,7 @@ def _demote_snapshot(
10191025 snapshot : Snapshot ,
10201026 environment_naming_info : EnvironmentNamingInfo ,
10211027 snapshots : t .Optional [t .Dict [SnapshotId , Snapshot ]],
1028+ table_mapping : t .Optional [t .Dict [str , str ]],
10221029 deployability_index : t .Optional [DeployabilityIndex ],
10231030 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]],
10241031 ) -> None :
@@ -1036,8 +1043,8 @@ def _demote_snapshot(
10361043 adapter .session (
10371044 snapshot .model .render_session_properties (
10381045 engine_adapter = adapter ,
1039- snapshots = snapshots ,
10401046 deployability_index = deployability_index ,
1047+ table_mapping = table_mapping ,
10411048 runtime_stage = RuntimeStage .DEMOTING ,
10421049 )
10431050 ),
0 commit comments