X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f6e894a53af83a69f553555cb4a6248d57a58391..32683f73c787464e16f2a146d4c08c4041087dd5:/lib-php/admin/setup.php diff --git a/lib-php/admin/setup.php b/lib-php/admin/setup.php index 902c24e0..d3831322 100644 --- a/lib-php/admin/setup.php +++ b/lib-php/admin/setup.php @@ -86,12 +86,25 @@ if ($aCMDResult['create-db'] || $aCMDResult['all']) { if ($aCMDResult['setup-db'] || $aCMDResult['all']) { $bDidSomething = true; - (clone($oNominatimCmd))->addParams('transition', '--setup-db')->run(true); + $oCmd = (clone($oNominatimCmd))->addParams('transition', '--setup-db'); + + if ($aCMDResult['no-partitions'] ?? false) { + $oCmd->addParams('--no-partitions'); + } + + $oCmd->run(true); } if ($aCMDResult['import-data'] || $aCMDResult['all']) { $bDidSomething = true; - $oSetup->importData($aCMDResult['osm-file']); + $oCmd = (clone($oNominatimCmd)) + ->addParams('transition', '--import-data') + ->addParams('--osm-file', $aCMDResult['osm-file']); + if ($aCMDResult['drop'] ?? false) { + $oCmd->addParams('--drop'); + } + + $oCmd->run(true); } if ($aCMDResult['create-functions'] || $aCMDResult['all']) {