X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fc99954b2e8256c7d14b350e07be395bab7c6484..42c80893cb1038e21c05c2d0d30e3a7a20f0fa26:/utils/setup.php?ds=sidebyside diff --git a/utils/setup.php b/utils/setup.php old mode 100755 new mode 100644 index 0d2e6583..3015f13a --- a/utils/setup.php +++ b/utils/setup.php @@ -1,11 +1,6 @@ -#!@PHP_BIN@ -Cq indirect via init-cmd.php->/lib/cmd.php for runWithEnv, getCmdOpt -// ->indirect via init-cmd.php->/lib/init.php->db.php for &getDB() - require_once(CONST_BasePath.'/lib/setup/SetupClass.php'); require_once(CONST_BasePath.'/lib/setup_functions.php'); ini_set('memory_limit', '800M'); @@ -89,9 +84,7 @@ if ($aCMDResult['setup-db'] || $aCMDResult['all']) { } // Try accessing the C module, so we know early if something is wrong -if (!checkModulePresence()) { - fail('error loading nominatim.so module'); -} +checkModulePresence(); // raises exception on failure if ($aCMDResult['import-data'] || $aCMDResult['all']) { $bDidSomething = true; @@ -107,6 +100,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']) { @@ -144,6 +138,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(); @@ -154,11 +153,6 @@ if ($aCMDResult['create-country-names'] || $aCMDResult['all']) { $oSetup->createCountryNames($aCMDResult); } -if ($aCMDResult['drop']) { - $bDidSomething = true; - $oSetup->drop($aCMDResult); -} - // ****************************************************** // If we did something, repeat the warnings if (!$bDidSomething) {