album/migrations/2018-09-05-065252_places_osm/up.sql
Rasmus Kaj 7cea04400f Refactor fetching places.
Added a command line subcommand to fetch places for specified images.
2018-09-05 23:39:35 +02:00

10 lines
368 B
SQL

-- Add fields for OpenStreetMap-based locations to places table.
ALTER TABLE places ADD COLUMN osm_id BIGINT UNIQUE;
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);
DROP INDEX places_name_idx;
CREATE UNIQUE INDEX places_name_idx ON places (place_name, osm_level);