X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b612b9942109a08c6ff8f49e3327e015fec08e67..ac116980ac78b74dbc1e0ae7ff2d329d7e581ba5:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 8ad96a95..95ad7992 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 +91,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']) { @@ -137,6 +129,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 +144,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(); } // ******************************************************