mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
add migration for upcoming change to tiger tables
This commit is contained in:
@@ -231,7 +231,7 @@ def create_interpolation_index_on_place(conn, **_):
|
|||||||
|
|
||||||
@_migration(4, 0, 99, 2)
|
@_migration(4, 0, 99, 2)
|
||||||
def add_step_column_for_interpolation(conn, **_):
|
def add_step_column_for_interpolation(conn, **_):
|
||||||
""" Add a new column 'step' to the interpolations table which will.
|
""" Add a new column 'step' to the interpolations table.
|
||||||
|
|
||||||
Also convers the data into the stricter format which requires that
|
Also convers the data into the stricter format which requires that
|
||||||
startnumbers comply with the odd/even requirements.
|
startnumbers comply with the odd/even requirements.
|
||||||
@@ -259,3 +259,15 @@ def add_step_column_for_interpolation(conn, **_):
|
|||||||
SET step = CASE WHEN interpolationtype = 'all'
|
SET step = CASE WHEN interpolationtype = 'all'
|
||||||
THEN 1 ELSE 2 END
|
THEN 1 ELSE 2 END
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
||||||
|
@_migration(4, 0, 99, 3)
|
||||||
|
def add_step_column_for_tiger(conn, **_):
|
||||||
|
""" Add a new column 'step' to the tiger data table.
|
||||||
|
"""
|
||||||
|
with conn.cursor() as cur:
|
||||||
|
cur.execute("ALTER TABLE location_property_tiger ADD COLUMN step SMALLINT")
|
||||||
|
cur.execute("""UPDATE location_property_tiger
|
||||||
|
SET step = CASE WHEN interpolationtype = 'all'
|
||||||
|
THEN 1 ELSE 2 END
|
||||||
|
""")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Version information for Nominatim.
|
|||||||
# patch level when cherry-picking the commit with the migration.
|
# patch level when cherry-picking the commit with the migration.
|
||||||
#
|
#
|
||||||
# Released versions always have a database patch level of 0.
|
# Released versions always have a database patch level of 0.
|
||||||
NOMINATIM_VERSION = (4, 0, 99, 3)
|
NOMINATIM_VERSION = (4, 0, 99, 4)
|
||||||
|
|
||||||
POSTGRESQL_REQUIRED_VERSION = (9, 5)
|
POSTGRESQL_REQUIRED_VERSION = (9, 5)
|
||||||
POSTGIS_REQUIRED_VERSION = (2, 2)
|
POSTGIS_REQUIRED_VERSION = (2, 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user