diff options
author | Jochen Topf <jochen@topf.org> | 2014-09-06 23:35:11 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-09-06 23:35:11 +0200 |
commit | c28ab66e0b520d5b15a63831130245a3524771c6 (patch) | |
tree | 047f569029e0dcc302a6e81b5ccb45162ecd6a1e /sources/master | |
parent | 6dfeebfad587fd03c0449e5d3e7f0ad88132d2c5 (diff) | |
download | taginfo-c28ab66e0b520d5b15a63831130245a3524771c6.tar taginfo-c28ab66e0b520d5b15a63831130245a3524771c6.tar.gz |
Add temporary hack to pull JOSM data into projects.
Diffstat (limited to 'sources/master')
-rw-r--r-- | sources/master/master.sql | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sources/master/master.sql b/sources/master/master.sql index 6d6bb14..6d5f349 100644 --- a/sources/master/master.sql +++ b/sources/master/master.sql @@ -53,12 +53,10 @@ INSERT INTO master_stats SELECT * FROM db.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 distinct key FROM wiki.wikipages WHERE value IS NULL); UPDATE db.keys SET in_wiki_en=1 WHERE key IN (SELECT distinct key FROM wiki.wikipages WHERE value IS NULL AND lang='en'); UPDATE db.keys SET in_josm=1 WHERE key IN (SELECT distinct k FROM josm.josm_style_rules); --- potlatch XXX -- ============================================================================ @@ -155,5 +153,16 @@ UPDATE suggestions SET score = count * (1+in_wiki); -- ============================================================================ +-- temporary hack to pull over JOSM data from old JOSM format into new projects format + +INSERT INTO projects.projects (id, json_url, name, description) VALUES ('josm', '', 'JOSM Editor', 'JOSM offline OSM Editor'); + +INSERT INTO projects.project_tags (project_id, key, value, on_node, on_way, on_relation, on_area, icon_url) SELECT 'josm', k, v, 1, 0, 0, 0, '/api/4/josm/style/image?style=standard&image=' || icon_source FROM josm.josm_style_rules WHERE icon_source IS NOT NULL; +INSERT INTO projects.project_tags (project_id, key, value, on_node, on_way, on_relation, on_area, icon_url) SELECT 'josm', k, v, 0, 1, 0, 0, 'https://chart.googleapis.com/chart?cht=bhs&chs=16x16&chf=bg,s,' || substr(line_color, 1+instr(line_color, '#')) FROM josm.josm_style_rules WHERE line_color IS NOT NULL; +INSERT INTO projects.project_tags (project_id, key, value, on_node, on_way, on_relation, on_area, icon_url) SELECT 'josm', k, v, 0, 0, 0, 1, 'https://chart.googleapis.com/chart?cht=bhs&chs=16x16&chf=bg,s,' || substr(area_color, 1+instr(area_color, '#')) FROM josm.josm_style_rules WHERE area_color IS NOT NULL; + + +-- ============================================================================ + ANALYZE; |