Use classes from ClearTables and add continents

This commit is contained in:
Lukas Martinelli
2016-11-28 15:42:13 +00:00
parent aed323bb99
commit 2f35ab3ee1
8 changed files with 88 additions and 31 deletions

View File

@@ -1,9 +1,9 @@
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'city_class') THEN
CREATE TYPE city_class AS ENUM ('city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'isolated_dwelling');
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'city_place') THEN
CREATE TYPE city_place AS ENUM ('city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'isolated_dwelling');
END IF;
END
$$;
ALTER TABLE osm_city_point ALTER COLUMN place TYPE city_class USING place::city_class;
ALTER TABLE osm_city_point ALTER COLUMN place TYPE city_place USING place::city_place;