From 63fc20d8d0e2acdf35e98bfd0829b52c8cc91306 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Fri, 6 Mar 2015 11:16:09 +0100 Subject: Remove deprecated table "selected_tags". --- sources/db/post.sql | 18 ------------------ sources/db/pre.sql | 12 ------------ 2 files changed, 30 deletions(-) (limited to 'sources/db') diff --git a/sources/db/post.sql b/sources/db/post.sql index 3e5b931..ad58ef6 100644 --- a/sources/db/post.sql +++ b/sources/db/post.sql @@ -60,24 +60,6 @@ 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 - SELECT key2, value2 FROM tag_combinations WHERE value2 != ''; - -UPDATE selected_tags SET - count_all = (SELECT t.count_all FROM tags t WHERE t.key=skey AND t.value=svalue), - count_nodes = (SELECT t.count_nodes FROM tags t WHERE t.key=skey AND t.value=svalue), - count_ways = (SELECT t.count_ways FROM tags t WHERE t.key=skey AND t.value=svalue), - count_relations = (SELECT t.count_relations FROM tags t WHERE t.key=skey AND t.value=svalue); - -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; diff --git a/sources/db/pre.sql b/sources/db/pre.sql index 586fe6c..9ee7126 100644 --- a/sources/db/pre.sql +++ b/sources/db/pre.sql @@ -140,15 +140,3 @@ 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, - count_all INTEGER DEFAULT 0, - count_nodes INTEGER DEFAULT 0, - count_ways INTEGER DEFAULT 0, - count_relations INTEGER DEFAULT 0, - in_wiki INTEGER -); - -- cgit v1.2.3