mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-10-27 11:42:46 +03:00
add migration for new lookup index
This commit is contained in:
parent
9f64c34f1a
commit
e6d855b954
@ -216,3 +216,14 @@ def create_tiger_housenumber_index(conn, **_):
|
||||
ON location_property_tiger
|
||||
USING btree(parent_place_id)
|
||||
INCLUDE (startnumber, endnumber) """)
|
||||
|
||||
|
||||
@_migration(4, 0, 99, 1)
|
||||
def create_interpolation_index_on_place(conn, **_):
|
||||
""" Create idx_place_interpolations for lookup of interpolation lines
|
||||
on updates.
|
||||
"""
|
||||
with conn.cursor() as cur:
|
||||
cur.execute("""CREATE INDEX IF NOT EXISTS idx_place_interpolations
|
||||
ON place USING gist(geometry)
|
||||
WHERE osm_type = 'W' and address ? 'interpolation'""")
|
||||
|
@ -20,11 +20,11 @@ Version information for Nominatim.
|
||||
# to 99 to make sure that the migration is applied when updating from a
|
||||
# patch release to the next minor version. Patch releases usually shouldn't
|
||||
# have migrations in them. When they are needed, then make sure that the
|
||||
# migration can reapplied and set the migration version to the appropriate
|
||||
# migration can be reapplied and set the migration version to the appropriate
|
||||
# patch level when cherry-picking the commit with the migration.
|
||||
#
|
||||
# Released versions always have a database patch level of 0.
|
||||
NOMINATIM_VERSION = (4, 0, 99, 1)
|
||||
NOMINATIM_VERSION = (4, 0, 99, 2)
|
||||
|
||||
POSTGRESQL_REQUIRED_VERSION = (9, 5)
|
||||
POSTGIS_REQUIRED_VERSION = (2, 2)
|
||||
|
Loading…
Reference in New Issue
Block a user