summaryrefslogtreecommitdiff
path: root/offline.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-07 11:14:15 +0300
committerAndrew Dolgov <[email protected]>2009-02-07 11:14:15 +0300
commit71af6d360960eddbd4233b2ed20b01aca5ee2fe1 (patch)
tree533ef8568abd5790cb66eb4d16654c0135cb888d /offline.js
parent67625745091788b14d7bb8d786f947ba8da29b9a (diff)
more schema updates
Diffstat (limited to 'offline.js')
-rw-r--r--offline.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/offline.js b/offline.js
index e6d5c48a2..be28b43d1 100644
--- a/offline.js
+++ b/offline.js
@@ -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 = "";