]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/admin/setup.php
move import-data option to native python
[nominatim.git] / lib-php / admin / setup.php
index 902c24e087c3ab5d7707c1f91d566f8e1d6ddb5c..d38313221c1ad4e7307ccd1ce1bee7abad4750e1 100644 (file)
@@ -86,12 +86,25 @@ if ($aCMDResult['create-db'] || $aCMDResult['all']) {
 
 if ($aCMDResult['setup-db'] || $aCMDResult['all']) {
     $bDidSomething = true;
 
 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;
 }
 
 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']) {
 }
 
 if ($aCMDResult['create-functions'] || $aCMDResult['all']) {