File tree Expand file tree Collapse file tree 3 files changed +292
-65
lines changed Expand file tree Collapse file tree 3 files changed +292
-65
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,13 @@ fn override_project_config_from_url(
253253 )
254254 } ) ?;
255255
256+ let clusters = project. clickhouse_config . clusters . clone ( ) ;
257+ let additional_databases = project. clickhouse_config . additional_databases . clone ( ) ;
258+
256259 project. clickhouse_config = clickhouse_config;
260+ project. clickhouse_config . clusters = clusters;
261+ project. clickhouse_config . additional_databases = additional_databases;
262+
257263 info ! (
258264 "Overriding project ClickHouse config from CLI: database = {}" ,
259265 project. clickhouse_config. db_name
Original file line number Diff line number Diff line change @@ -1169,8 +1169,16 @@ pub async fn remote_gen_migration(
11691169 } ,
11701170 ) ;
11711171
1172+ // Validate the plan before generating migration files
1173+ let plan = InfraPlan {
1174+ target_infra_map : local_infra_map. clone ( ) ,
1175+ changes,
1176+ } ;
1177+
1178+ plan_validator:: validate ( project, & plan) ?;
1179+
11721180 let db_migration =
1173- MigrationPlan :: from_infra_plan ( & changes, & project. clickhouse_config . db_name ) ?;
1181+ MigrationPlan :: from_infra_plan ( & plan . changes , & project. clickhouse_config . db_name ) ?;
11741182
11751183 Ok ( MigrationPlanWithBeforeAfter {
11761184 remote_state : remote_infra_map,
You can’t perform that action at this time.
0 commit comments