]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/database_import.py
Merge pull request #2192 from lonvia/database-versioning
[nominatim.git] / 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')