mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 05:35:13 +03:00
add migration for place_to_be_deleted table
This commit is contained in:
parent
2fac507453
commit
74405e9684
@ -315,3 +315,20 @@ def mark_internal_country_names(conn: Connection, config: Configuration, **_: An
|
|||||||
names = {}
|
names = {}
|
||||||
names['countrycode'] = country_code
|
names['countrycode'] = country_code
|
||||||
analyzer.add_country_names(country_code, names)
|
analyzer.add_country_names(country_code, names)
|
||||||
|
|
||||||
|
|
||||||
|
@_migration(4, 1, 99, 0)
|
||||||
|
def add_place_deletion_todo_table(conn: Connection, **_: Any) -> None:
|
||||||
|
""" Add helper table for deleting data on updates.
|
||||||
|
|
||||||
|
The table is only necessary when updates are possible, i.e.
|
||||||
|
the database is not in freeze mode.
|
||||||
|
"""
|
||||||
|
if conn.table_exists('place'):
|
||||||
|
with conn.cursor() as cur:
|
||||||
|
cur.execute("""CREATE TABLE IF NOT EXISTS place_to_be_deleted (
|
||||||
|
osm_type CHAR(1),
|
||||||
|
osm_id BIGINT,
|
||||||
|
class TEXT,
|
||||||
|
type TEXT,
|
||||||
|
deferred BOOLEAN)""")
|
||||||
|
@ -25,7 +25,7 @@ from typing import Optional, Tuple
|
|||||||
# 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, 1, 0, 0)
|
NOMINATIM_VERSION = (4, 1, 99, 0)
|
||||||
|
|
||||||
POSTGRESQL_REQUIRED_VERSION = (9, 6)
|
POSTGRESQL_REQUIRED_VERSION = (9, 6)
|
||||||
POSTGIS_REQUIRED_VERSION = (2, 2)
|
POSTGIS_REQUIRED_VERSION = (2, 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user