]> git.wh0rd.org - tt-rss.git/commitdiff
more schema updates
authorAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 08:14:15 +0000 (11:14 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 08:14:15 +0000 (11:14 +0300)
offline.js

index e6d5c48a2297ca593e71feee57432797c2483b0f..be28b43d11c2fc80f4f43bc1e378eebd08260c5b 100644 (file)
@@ -1,4 +1,4 @@
-var SCHEMA_VERSION = 9;
+var SCHEMA_VERSION = 10;
 
 var offline_mode = false;
 var store = false;
@@ -256,8 +256,6 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
 
                                var labels = get_local_article_labels(id);
 
-                               debug(labels);
-
                                var labels_str = "<span id=\"HLLCTR-"+id+"\">";
                                labels_str += format_article_labels(labels, id);
                                labels_str += "</span>";
@@ -940,12 +938,12 @@ function init_gears() {
                                        [SCHEMA_VERSION]);
                        }
 
-                       db.execute("CREATE TABLE IF NOT EXISTS init_params (key text PRIMARY KEY, value text)");
+                       db.execute("CREATE TABLE IF NOT EXISTS init_params (key text, value text)");
 
-                       db.execute("CREATE TABLE IF NOT EXISTS cache (id PRIMARY KEY, article text, param text, added text)");
-                       db.execute("CREATE TABLE IF NOT EXISTS feeds (id PRIMARY KEY, title text, has_icon integer, cat_id integer)");
-                       db.execute("CREATE TABLE IF NOT EXISTS categories (id PRIMARY KEY, title text, collapsed integer)");
-                       db.execute("CREATE TABLE IF NOT EXISTS labels (id PRIMARY KEY, caption text, fg_color text, bg_color text)");
+                       db.execute("CREATE TABLE IF NOT EXISTS cache (id integer, article text, param text, added text)");
+                       db.execute("CREATE TABLE IF NOT EXISTS feeds (id integer, title text, has_icon integer, cat_id integer)");
+                       db.execute("CREATE TABLE IF NOT EXISTS categories (id integer, title text, collapsed integer)");
+                       db.execute("CREATE TABLE IF NOT EXISTS labels (id integer, caption text, fg_color text, bg_color text)");
                        db.execute("CREATE TABLE IF NOT EXISTS article_labels (id integer, label_id integer)");
                        db.execute("CREATE TABLE IF NOT EXISTS articles (id integer, feed_id integer, title text, link text, guid text, updated timestamp, content text, tags text, unread integer, marked integer, added text, modified timestamp, comments text)");
        
@@ -953,7 +951,7 @@ function init_gears() {
                        db.execute("CREATE INDEX IF NOT EXISTS article_labels_label_id_idx ON article_labels(label_id)");
                        db.execute("CREATE INDEX IF NOT EXISTS articles_feed_id_idx ON articles(feed_id)");
 
-                       db.execute("CREATE TABLE IF NOT EXISTS syncdata (key PRIMARY KEY, value text)");
+                       db.execute("CREATE TABLE IF NOT EXISTS syncdata (key integer, value text)");
 
                        db.execute("DELETE FROM cache WHERE id LIKE 'F:%' OR id LIKE 'C:%'");
 
@@ -1012,6 +1010,7 @@ function local_collapse_cat(id) {
 
 function get_local_category_title(id) {
        try {
+       
                var rs = db.execute("SELECT title FROM categories WHERE id = ?", [id]);
                var tmp = "";