X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/1d82569f6d22c4d43303cedb50cfe361277dd99b..54253946549dbb4d0b04b35830a811a6abe61549:/nominatim/tools/migration.py diff --git a/nominatim/tools/migration.py b/nominatim/tools/migration.py index dc6dfeca..997aa044 100644 --- a/nominatim/tools/migration.py +++ b/nominatim/tools/migration.py @@ -271,3 +271,12 @@ def add_step_column_for_tiger(conn, **_): SET step = CASE WHEN interpolationtype = 'all' THEN 1 ELSE 2 END """) + + +@_migration(4, 0, 99, 4) +def add_derived_name_column_for_country_names(conn, **_): + """ Add a new column 'derived_name' which in the future takes the + country names as imported from OSM data. + """ + with conn.cursor() as cur: + cur.execute("ALTER TABLE country_name ADD COLUMN derived_name public.HSTORE")