aboutsummaryrefslogtreecommitdiff
path: root/sources/db
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-29 15:44:45 +0200
committerJochen Topf <jochen@topf.org>2014-09-29 15:48:21 +0200
commit0fdfaca9dfad26abe8f6e25ef12ca1824d2e0c10 (patch)
tree04bb19587e8eb085aeabe6464719805c1f9c95fa /sources/db
parent99cfae85fd8af0a7d8954b343dc53c4c9ba5b687 (diff)
downloadtaginfo-0fdfaca9dfad26abe8f6e25ef12ca1824d2e0c10.tar
taginfo-0fdfaca9dfad26abe8f6e25ef12ca1824d2e0c10.tar.gz
Use new top_tags table instead of old selected_tags table.
Diffstat (limited to 'sources/db')
-rw-r--r--sources/db/post.sql5
-rw-r--r--sources/db/pre.sql2
2 files changed, 6 insertions, 1 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,