]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/tables.sql
updated wikipedia article code to allow for mutliple languages and remove code duplic...
[nominatim.git] / sql / tables.sql
index fd01663eda1f096a0bce7879347d8e94d4c8722b..48740f232963b03da072233e75e29fefd01ca8e1 100644 (file)
@@ -191,18 +191,7 @@ drop table placex;
 CREATE TABLE placex (
   place_id BIGINT NOT NULL,
   partition integer,
-  osm_type char(1),
-  osm_id INTEGER,
-  class TEXT NOT NULL,
-  type TEXT NOT NULL,
-  name HSTORE,
-  admin_level INTEGER,
-  housenumber TEXT,
-  street TEXT,
-  isin TEXT,
-  postcode TEXT,
-  country_code varchar(2),
-  extratags HSTORE,
+  LIKE place INCLUDING CONSTRAINTS,
   parent_place_id BIGINT,
   linked_place_id BIGINT,
   rank_address INTEGER,
@@ -213,7 +202,6 @@ CREATE TABLE placex (
   wikipedia TEXT, -- calculated wikipedia article name (language:title)
   geometry_sector INTEGER
   );
-SELECT AddGeometryColumn('placex', 'geometry', 4326, 'GEOMETRY', 2);
 SELECT AddGeometryColumn('placex', 'centroid', 4326, 'GEOMETRY', 2);
 CREATE UNIQUE INDEX idx_place_id ON placex USING BTREE (place_id);
 CREATE INDEX idx_placex_osmid ON placex USING BTREE (osm_type, osm_id);