From 1dc5013314a56a830a6d0f439866e7b18a217d5a Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 24 Oct 2010 15:32:32 +0200 Subject: Begin of Potlatch support --- sources/master/master.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sources/master') diff --git a/sources/master/master.sql b/sources/master/master.sql index c446ae7..d6d28af 100644 --- a/sources/master/master.sql +++ b/sources/master/master.sql @@ -35,6 +35,17 @@ INSERT INTO master_stats SELECT * FROM db.stats UNION SELECT * FROM josm.stats UNION SELECT * FROM wiki.stats; +INSERT INTO db.keys (key) SELECT DISTINCT key FROM wiki.wikipages WHERE key NOT IN (SELECT key FROM db.keys); +INSERT INTO db.keys (key) SELECT DISTINCT k FROM josm.josm_style_rules WHERE k NOT IN (SELECT key FROM db.keys); +-- potlatch XXX +UPDATE db.keys SET in_wiki=1 WHERE key IN (SELECT key FROM wiki.wikipages); +UPDATE db.keys SET in_josm=1 WHERE key IN (SELECT k FROM josm.josm_style_rules); +-- potlatch XXX + +-- too slow, so we drop it for now +-- INSERT INTO db.tags (key, value) SELECT DISTINCT key, value FROM wiki.wikipages WHERE key || '=XX=' || value NOT IN (SELECT key || '=XX=' || value FROM db.tags); + + DROP TABLE IF EXISTS popular_keys; CREATE TABLE popular_keys ( @@ -44,6 +55,7 @@ CREATE TABLE popular_keys ( wikipages INTEGER DEFAULT 0, in_wiki INTEGER DEFAULT 0, in_josm INTEGER DEFAULT 0, + in_potlatch INTEGER DEFAULT 0, scale_count REAL, scale_users REAL, scale_wiki REAL, -- cgit v1.2.3