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 @@ -1170,8 +1170,16 @@ pub async fn remote_gen_migration(
11701170 } ,
11711171 ) ;
11721172
1173+ // Validate the plan before generating migration files
1174+ let plan = InfraPlan {
1175+ target_infra_map : local_infra_map. clone ( ) ,
1176+ changes,
1177+ } ;
1178+
1179+ plan_validator:: validate ( project, & plan) ?;
1180+
11731181 let db_migration =
1174- MigrationPlan :: from_infra_plan ( & changes, & project. clickhouse_config . db_name ) ?;
1182+ MigrationPlan :: from_infra_plan ( & plan . changes , & project. clickhouse_config . db_name ) ?;
11751183
11761184 Ok ( MigrationPlanWithBeforeAfter {
11771185 remote_state : remote_infra_map,
You can’t perform that action at this time.
0 commit comments