From: Sarah Hoffmann Date: Sun, 5 Jul 2020 08:57:12 +0000 (+0200) Subject: Merge branch 'move-datasources-into-separate-repos' of https://github.com/mtmail... X-Git-Tag: v3.6.0~116 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/1889643eca5754664da106665f3826960858eccf?hp=64ace51e02790bf88e162a15236c5ac2af865c5e Merge branch 'move-datasources-into-separate-repos' of https://github.com/mtmail/Nominatim into mtmail-move-datasources-into-separate-repos --- diff --git a/.travis.yml b/.travis.yml index 08aa9eb4..4461add9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ script: - if [[ $TEST_SUITE == "tests" ]]; then phpcs --report-width=120 . ; fi - cd $TRAVIS_BUILD_DIR/test/php - if [[ $TEST_SUITE == "tests" ]]; then /usr/bin/phpunit ./ ; fi + - cd $TRAVIS_BUILD_DIR/build + - /usr/bin/env php ./utils/setup.php --setup-website - cd $TRAVIS_BUILD_DIR/test/bdd - # behave --format=progress3 api - if [[ $TEST_SUITE == "tests" ]]; then behave -DREMOVE_TEMPLATE=1 --format=progress3 db ; fi diff --git a/cmake/website.tmpl b/cmake/website.tmpl index 0257aa10..8692280d 100755 --- a/cmake/website.tmpl +++ b/cmake/website.tmpl @@ -1,3 +1,3 @@ 3.4.0 ### Reorganisation of location_area_country table @@ -38,6 +50,12 @@ CREATE INDEX idx_location_area_country_geometry ON location_area_country USING G CREATE INDEX idx_location_area_country_place_id ON location_area_country USING BTREE (place_id); ``` +Finally, update all SQL functions: + +```sh +./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions +``` + ## 3.2.0 -> 3.3.0 ### New database connection string (DSN) format diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index 385eff70..16c48729 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -694,6 +694,45 @@ class SetupFunctions $this->removeFlatnodeFile(); } + /** + * Setup settings-frontend.php in the build/website directory + * + * @return null + */ + public function setupWebsite() + { + $rOutputFile = fopen(CONST_InstallPath.'/website/settings-frontend.php', 'w'); + + fwrite($rOutputFile, "createDB(); } -$oSetup->connect(); +if (!$aCMDResult['setup-website']) { + $oSetup->connect(); + // Try accessing the C module, so we know early if something is wrong + checkModulePresence(); // raises exception on failure +} 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; @@ -153,6 +156,11 @@ if ($aCMDResult['create-country-names'] || $aCMDResult['all']) { $oSetup->createCountryNames($aCMDResult); } +if ($aCMDResult['setup-website'] || $aCMDResult['all']) { + $bDidSomething = true; + $oSetup->setupWebsite(); +} + // ****************************************************** // If we did something, repeat the warnings if (!$bDidSomething) {