summaryrefslogtreecommitdiff
path: root/sources/wiki/pre.sql
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-09 19:18:55 +0100
committerJochen Topf <jochen@topf.org>2013-01-09 19:18:55 +0100
commit64a047f622a5ed15dea94b5e52dd8c948fce9e95 (patch)
tree1dfeecec0fa0477c1a246ef6567dffc56592d325 /sources/wiki/pre.sql
parent9cadfd89c12c9223e7c572646680d0bcce57310c (diff)
downloadtaginfo-64a047f622a5ed15dea94b5e52dd8c948fce9e95.tar
taginfo-64a047f622a5ed15dea94b5e52dd8c948fce9e95.tar.gz
Better support for wiki images.
Key and tag wiki pages can contain images. Until now we only got the titles of those images. Now we also get the URL to the image, URL to thumbnails, width, height, and mime type. This information is now exposed in the API and it is used to show the images in the Overview tab of the key and tag pages. While we are changing the update process anyway, I changed the program that gets the list of all pages to also output the time those pages changed last. This information is currently not used, but it could be used to cache those pages locally making the update much faster and adding less strain to the wiki server.
Diffstat (limited to 'sources/wiki/pre.sql')
-rw-r--r--sources/wiki/pre.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/sources/wiki/pre.sql b/sources/wiki/pre.sql
index ebb80d3..8a515e7 100644
--- a/sources/wiki/pre.sql
+++ b/sources/wiki/pre.sql
@@ -33,6 +33,19 @@ CREATE TABLE wikipages (
status TEXT
);
+DROP TABLE IF EXISTS wiki_images;
+
+CREATE TABLE wiki_images (
+ image TEXT,
+ width INTEGER,
+ height INTEGER,
+ size INTEGER,
+ mime TEXT,
+ image_url TEXT,
+ thumb_url_prefix TEXT,
+ thumb_url_suffix TEXT
+);
+
DROP TABLE IF EXISTS wikipages_keys;
CREATE TABLE wikipages_keys (
@@ -64,6 +77,14 @@ CREATE TABLE invalid_page_titles (
title TEXT
);
+DROP TABLE IF EXISTS invalid_image_titles;
+
+CREATE TABLE invalid_image_titles (
+ reason TEXT,
+ page_title TEXT,
+ image_title TEXT
+);
+
DROP TABLE IF EXISTS words;
CREATE TABLE words (