]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #2299 from lonvia/update-actions
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 27 Apr 2021 10:18:45 +0000 (12:18 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Apr 2021 10:18:45 +0000 (12:18 +0200)
Fix database check for reverse-only

.github/workflows/ci-tests.yml
nominatim/tools/check_database.py

index a4bb45e0480f13018da86b2d68438fabc834ce27..3d473751c01614594b8bec09ea0a8d201d2c84d5 100644 (file)
@@ -159,7 +159,7 @@ jobs:
               run: nominatim special-phrases --import-from-wiki
               working-directory: data-env
 
-            - name: Check import
+            - name: Check full import
               run: nominatim admin --check-database
               working-directory: data-env
 
@@ -174,7 +174,11 @@ jobs:
               working-directory: data-env
 
             - name: Run reverse-only import
-              run : nominatim import --osm-file ../monaco-latest.osm.pbf --reverse-only
+              run : nominatim import --osm-file ../monaco-latest.osm.pbf --reverse-only --no-updates
               working-directory: data-env
               env:
                   NOMINATIM_DATABASE_DSN: pgsql:dbname=reverse
+
+            - name: Check reverse import
+              run: nominatim admin --check-database
+              working-directory: data-env
index 479a28a3f89bcf164adb1ff5723c9ad7d57bb54c..2d57c5ee323ee8e1f620a26932b2e51be6530384 100644 (file)
@@ -94,14 +94,14 @@ def _get_indexes(conn):
         indexes.extend(('idx_search_name_nameaddress_vector',
                         'idx_search_name_name_vector',
                         'idx_search_name_centroid'))
+        if conn.server_version_tuple() >= (11, 0, 0):
+            indexes.extend(('idx_placex_housenumber',
+                            'idx_osmline_parent_osm_id_with_hnr'))
     if conn.table_exists('place'):
         indexes.extend(('idx_placex_pendingsector',
                         'idx_location_area_country_place_id',
                         'idx_place_osm_unique'
                        ))
-    if conn.server_version_tuple() >= (11, 0, 0):
-        indexes.extend(('idx_placex_housenumber',
-                        'idx_osmline_parent_osm_id_with_hnr'))
 
     return indexes