diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/db/post.sql | 5 | ||||
-rw-r--r-- | sources/db/pre.sql | 2 | ||||
-rw-r--r-- | sources/master/master.sql | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sources/db/post.sql b/sources/db/post.sql index 35c0a43..08f33b0 100644 --- a/sources/db/post.sql +++ b/sources/db/post.sql @@ -27,6 +27,9 @@ CREATE INDEX tag_combinations_key2_value2_idx ON tag_combinations (key2, CREATE UNIQUE INDEX relation_types_rtype_idx ON relation_types (rtype); CREATE INDEX relation_roles_rtype_idx ON relation_roles (rtype); +-- ============================================================================ +-- deprecated: can be removed soon + INSERT INTO selected_tags (skey, svalue) SELECT key1, value1 FROM tag_combinations WHERE value1 != '' UNION @@ -42,6 +45,8 @@ ANALYZE selected_tags; CREATE UNIQUE INDEX selected_tags_key_value_idx ON selected_tags (skey, svalue); +-- ============================================================================ + INSERT INTO stats (key, value) SELECT 'num_keys', count(*) FROM keys; INSERT INTO stats (key, value) SELECT 'num_keys_on_nodes', count(*) FROM keys WHERE count_nodes > 0; INSERT INTO stats (key, value) SELECT 'num_keys_on_ways', count(*) FROM keys WHERE count_ways > 0; diff --git a/sources/db/pre.sql b/sources/db/pre.sql index 9d349a3..e0320ea 100644 --- a/sources/db/pre.sql +++ b/sources/db/pre.sql @@ -134,8 +134,8 @@ CREATE TABLE prevalent_roles ( fraction REAL ); +-- deprecated: can be removed soon DROP TABLE IF EXISTS selected_tags; - CREATE TABLE selected_tags ( skey VARCHAR, svalue VARCHAR, diff --git a/sources/master/master.sql b/sources/master/master.sql index 5397a4c..8433ec5 100644 --- a/sources/master/master.sql +++ b/sources/master/master.sql @@ -62,13 +62,8 @@ UPDATE db.keys SET in_wiki_en=1 WHERE key IN (SELECT distinct key FROM wiki.wiki UPDATE db.tags SET in_wiki=1 WHERE key IN (SELECT distinct key FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*') AND key || '=' || value IN (SELECT distinct tag FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*'); UPDATE db.tags SET in_wiki_en=1 WHERE key IN (SELECT distinct key FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*' AND lang='en') AND key || '=' || value IN (SELECT distinct tag FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*' AND lang='en'); -UPDATE db.selected_tags SET in_wiki=1 WHERE skey || '=' || svalue IN (SELECT distinct tag FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*'); -UPDATE db.selected_tags SET in_wiki_en=1 WHERE skey || '=' || svalue IN (SELECT distinct tag FROM wiki.wikipages WHERE value IS NOT NULL AND value != '*' AND lang='en'); - -- ============================================================================ --- currently unused future replacement for db.selected_tags - DROP TABLE IF EXISTS top_tags; CREATE TABLE top_tags ( skey VARCHAR, |