reorganise layout of location_postcode table

Also renames the table as this will make it easier to migrate.
This commit is contained in:
Sarah Hoffmann
2025-12-23 12:13:19 +01:00
parent 7ef3f99fa4
commit 89821d01e0
14 changed files with 69 additions and 53 deletions

View File

@@ -2,7 +2,7 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
# Copyright (C) 2024 by the Nominatim developer community.
# Copyright (C) 2025 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
SQLAlchemy definitions for all tables used by the frontend.
@@ -67,15 +67,16 @@ class SearchTables:
sa.Column('isaddress', sa.Boolean))
self.postcode = sa.Table(
'location_postcode', meta,
'location_postcodes', meta,
sa.Column('place_id', sa.BigInteger),
sa.Column('parent_place_id', sa.BigInteger),
sa.Column('osm_id', sa.BigInteger),
sa.Column('rank_search', sa.SmallInteger),
sa.Column('rank_address', sa.SmallInteger),
sa.Column('indexed_status', sa.SmallInteger),
sa.Column('indexed_date', sa.DateTime),
sa.Column('country_code', sa.String(2)),
sa.Column('postcode', sa.Text),
sa.Column('centroid', Geometry),
sa.Column('geometry', Geometry))
self.osmline = sa.Table(