From 1693fa85d4c9e968b501e09c450ed7cf25965940 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 31 Aug 2006 05:58:32 +0000 Subject: [PATCH] Don't coerce text values in itemData to numbers (like, say, stripping zeroes from ISBN's--thanks Simon) (Apparently 'columnName NONE' in SQLite is functionally equivalent to 'columnName ILUVTIDDLYWINKS' in setting column affinity--as in, they both use the default of NUMERIC--which frankly I feel the docs could've been slightly more clear on, since they scatter the word NONE in capital letters all about the page with the other affinity keywords...) --- chrome/chromeFiles/content/scholar/xpcom/schema.js | 4 ++-- schema.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/schema.js b/chrome/chromeFiles/content/scholar/xpcom/schema.js index 1716e8cff8..113034c496 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/schema.js +++ b/chrome/chromeFiles/content/scholar/xpcom/schema.js @@ -401,7 +401,7 @@ Scholar.Schema = new function(){ // // Change this value to match the schema version // - var toVersion = 45; + var toVersion = 46; if (toVersion != _getSchemaSQLVersion()){ throw('Schema version does not match version in _migrateSchema()'); @@ -425,7 +425,7 @@ Scholar.Schema = new function(){ } } - if (i==45){ + if (i==46){ // Clear storage directory var file = Scholar.getStorageDirectory(); if (file.exists()){ diff --git a/schema.sql b/schema.sql index 64e9f7de2c..f15c462e65 100644 --- a/schema.sql +++ b/schema.sql @@ -1,4 +1,4 @@ --- 45 +-- 46 DROP TABLE IF EXISTS version; CREATE TABLE version ( @@ -60,7 +60,7 @@ CREATE TABLE itemData ( itemID INT, fieldID INT, - value NONE, + value, PRIMARY KEY (itemID, fieldID), FOREIGN KEY (itemID) REFERENCES items(itemID), FOREIGN KEY (fieldID) REFERENCES fields(fieldID)