2017-11-23 21:56:33 +04:00
|
|
|
-- Add fields for OpenStreetMap-based locations to places table.
|
2018-04-27 11:14:18 +04:00
|
|
|
ALTER TABLE places ADD COLUMN osm_id BIGINT UNIQUE;
|
2017-11-23 21:56:33 +04:00
|
|
|
ALTER TABLE places ADD COLUMN osm_level SMALLINT;
|
|
|
|
|
|
|
|
CREATE INDEX places_osm_idx ON places (osm_id);
|
2018-09-06 01:39:35 +04:00
|
|
|
CREATE INDEX places_osml_idx ON places (osm_level);
|
2017-11-23 21:56:33 +04:00
|
|
|
|
2018-09-06 01:39:35 +04:00
|
|
|
DROP INDEX places_name_idx;
|
|
|
|
CREATE UNIQUE INDEX places_name_idx ON places (place_name, osm_level);
|