X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/909b0c7462b336d07cab4499529957a4096a8c18..f59af7483b5a918f463fae160a41eacefe47e7f0:/sql/tables.sql diff --git a/sql/tables.sql b/sql/tables.sql index 4a22a814..0245e3c3 100644 --- a/sql/tables.sql +++ b/sql/tables.sql @@ -10,7 +10,7 @@ drop table if exists import_osmosis_log; CREATE TABLE import_osmosis_log ( batchend timestamp, batchseq integer, - batchsize integer, + batchsize bigint, starttime timestamp, endtime timestamp, event text @@ -36,6 +36,7 @@ GRANT SELECT ON new_query_log TO "{www-user}" ; GRANT SELECT ON TABLE country_name TO "{www-user}"; GRANT SELECT ON TABLE gb_postcode TO "{www-user}"; +GRANT SELECT ON TABLE us_postcode TO "{www-user}"; drop table IF EXISTS word; CREATE TABLE word ( @@ -69,6 +70,15 @@ CREATE TABLE location_area ( CREATE TABLE location_area_large () INHERITS (location_area); +DROP TABLE IF EXISTS location_area_country; +CREATE TABLE location_area_country ( + place_id BIGINT, + country_code varchar(2), + geometry GEOMETRY(Geometry, 4326) + ) {ts:address-data}; +CREATE INDEX idx_location_area_country_geometry ON location_area_country USING GIST (geometry) {ts:address-index}; + + drop table IF EXISTS location_property CASCADE; CREATE TABLE location_property ( place_id BIGINT, @@ -258,7 +268,9 @@ CREATE TABLE wikipedia_article ( lon double precision, importance double precision, osm_type character(1), - osm_id bigint + osm_id bigint, + wd_page_title text, + instance_of text ); ALTER TABLE ONLY wikipedia_article ADD CONSTRAINT wikipedia_article_pkey PRIMARY KEY (language, title); CREATE INDEX idx_wikipedia_article_osm_id ON wikipedia_article USING btree (osm_type, osm_id);