X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a7e782353522da11504efd6e1948b86e2a97e7f7..b133f2bc4cd5e467ff6ef10124416b1307cfdb62:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 8ad96a95..713fe561 100644 --- a/utils/setup.php +++ b/utils/setup.php @@ -1,8 +1,8 @@ createDB(); } -$oSetup->connect(); - if ($aCMDResult['setup-db'] || $aCMDResult['all']) { $bDidSomething = true; $oSetup->setupDB(); } -// Try accessing the C module, so we know early if something is wrong -checkModulePresence(); // raises exception on failure - if ($aCMDResult['import-data'] || $aCMDResult['all']) { $bDidSomething = true; $oSetup->importData($aCMDResult['osm-file']); @@ -100,6 +93,7 @@ if ($aCMDResult['create-tables'] || $aCMDResult['all']) { $bDidSomething = true; $oSetup->createTables($aCMDResult['reverse-only']); $oSetup->createFunctions(); + $oSetup->createTableTriggers(); } if ($aCMDResult['create-partition-tables'] || $aCMDResult['all']) { @@ -124,7 +118,11 @@ if ($aCMDResult['load-data'] || $aCMDResult['all']) { if ($aCMDResult['import-tiger-data']) { $bDidSomething = true; - $oSetup->importTigerData(); + $sTigerPath = getSetting('TIGER_DATA_PATH'); + if (!$sTigerPath) { + $sTigerPath = CONST_DataDir.'/data/tiger'; + } + $oSetup->importTigerData($sTigerPath); } if ($aCMDResult['calculate-postcodes'] || $aCMDResult['all']) { @@ -137,6 +135,11 @@ if ($aCMDResult['index'] || $aCMDResult['all']) { $oSetup->index($aCMDResult['index-noanalyse']); } +if ($aCMDResult['drop']) { + $bDidSomething = true; + $oSetup->drop($aCMDResult); +} + if ($aCMDResult['create-search-indices'] || $aCMDResult['all']) { $bDidSomething = true; $oSetup->createSearchIndices(); @@ -147,9 +150,9 @@ if ($aCMDResult['create-country-names'] || $aCMDResult['all']) { $oSetup->createCountryNames($aCMDResult); } -if ($aCMDResult['drop']) { +if ($aCMDResult['setup-website'] || $aCMDResult['all']) { $bDidSomething = true; - $oSetup->drop($aCMDResult); + $oSetup->setupWebsite(); } // ******************************************************