From d14a3df10fe0a2834fd38770179bf0318f5eecfa Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 26 Feb 2021 18:20:53 +0100 Subject: [PATCH] do not truncate search_name in reverse-only mode --- nominatim/tools/database_import.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nominatim/tools/database_import.py b/nominatim/tools/database_import.py index 7d71386f..ab8ccdd2 100644 --- a/nominatim/tools/database_import.py +++ b/nominatim/tools/database_import.py @@ -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') -- 2.39.5