remove country from place_addressline

The country information can be determined sufficiently from
the country code. We only loose the specific OSM object
behind the address.

Also streamlines the location_area_country table.
This commit is contained in:
Sarah Hoffmann
2019-07-09 20:47:25 +02:00
parent 745e52b798
commit be47cd2549
4 changed files with 17 additions and 13 deletions

View File

@@ -69,6 +69,15 @@ CREATE TABLE location_area (
CREATE TABLE location_area_large () INHERITS (location_area);
DROP TABLE IF EXISTS location_area_country;
CREATE TABLE location_area_country (
place_id BIGINT,
country_code varchar(2),
geometry GEOMETRY(Geometry, 4326)
) {ts:address-data};
CREATE INDEX idx_location_area_country_geometry ON location_area_country USING GIST (geometry) {ts:address-index};
drop table IF EXISTS location_property CASCADE;
CREATE TABLE location_property (
place_id BIGINT,