album/migrations/2018-09-05-065252_places_osm/up.sql

10 lines
368 B
MySQL
Raw Normal View History

2017-11-23 21:56:33 +04:00
-- Add fields for OpenStreetMap-based locations to places table.
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);
CREATE INDEX places_osml_idx ON places (osm_level);
2017-11-23 21:56:33 +04:00
DROP INDEX places_name_idx;
CREATE UNIQUE INDEX places_name_idx ON places (place_name, osm_level);