commit 1693fa85d4c9e968b501e09c450ed7cf25965940
parent 4b756d700b2964653811f2b7a43b7e15d31bdc0b
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 31 Aug 2006 05:58:32 +0000
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...)
Diffstat:
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
@@ -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
@@ -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)