]> git.openstreetmap.org Git - nominatim.git/commitdiff
do not truncate search_name in reverse-only mode
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 26 Feb 2021 17:20:53 +0000 (18:20 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 27 Feb 2021 08:46:42 +0000 (09:46 +0100)
nominatim/tools/database_import.py

index 7d71386fc7921b752c10cfd57f24644aded895d2..ab8ccdd2a129365a03930d1568619b38dc14d128 100644 (file)
@@ -191,7 +191,8 @@ def truncate_data_tables(conn, max_word_frequency=None):
         cur.execute('TRUNCATE location_property_tiger')
         cur.execute('TRUNCATE location_property_osmline')
         cur.execute('TRUNCATE location_postcode')
-        cur.execute('TRUNCATE search_name')
+        if conn.table_exists('search_name'):
+            cur.execute('TRUNCATE search_name')
         cur.execute('DROP SEQUENCE IF EXISTS seq_place')
         cur.execute('CREATE SEQUENCE seq_place start 100000')