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

@@ -48,9 +48,6 @@ CREATE INDEX IF NOT EXISTS idx_osmline_parent_place_id
---
CREATE INDEX IF NOT EXISTS idx_osmline_parent_osm_id
ON location_property_osmline USING BTREE (osm_id) {{db.tablespace.search_index}};
---
CREATE INDEX IF NOT EXISTS idx_postcode_postcode
ON location_postcode USING BTREE (postcode) {{db.tablespace.search_index}};
{% if drop %}
---
@@ -77,8 +74,8 @@ CREATE INDEX IF NOT EXISTS idx_postcode_postcode
deferred BOOLEAN
);
---
CREATE INDEX IF NOT EXISTS idx_location_postcode_parent_place_id
ON location_postcode USING BTREE (parent_place_id) {{db.tablespace.address_index}};
CREATE INDEX IF NOT EXISTS idx_location_postcodes_parent_place_id
ON location_postcodes USING BTREE (parent_place_id) {{db.tablespace.address_index}};
{% endif %}
-- Indices only needed for search.