www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 4c1f8c729da2d0c0b7cc1fbe6575c66beda59b16
parent 1da2221d40dff881b7aecbf13c71ef28a2e86e76
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 25 Jul 2008 18:01:16 +0000

Fix "data type mismatch" error on upgrade, I think


Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -1050,7 +1050,7 @@ Zotero.Schema = new function(){ Zotero.DB.query("UPDATE itemAttachments SET itemID=? WHERE itemID=?", [itemID, 0]); } if (Zotero.DB.valueQuery("SELECT COUNT(*) FROM collections WHERE collectionID=0")) { - var collectionID = Zotero.ID.get('collections'); + var collectionID = Zotero.ID.get('collections', true); Zotero.DB.query("UPDATE collections SET collectionID=? WHERE collectionID=0", [collectionID]); Zotero.DB.query("UPDATE collectionItems SET collectionID=? WHERE collectionID=0", [collectionID]); } @@ -1633,7 +1633,7 @@ Zotero.Schema = new function(){ // Migrate big integers var itemIDs = Zotero.DB.columnQuery("SELECT itemID FROM items WHERE itemID>16777215"); for each(var oldID in itemIDs) { - var newID = Zotero.ID.get('items'); + var newID = Zotero.ID.get('items', true); var params = [newID, oldID]; Zotero.DB.query("UPDATE items SET itemID=? WHERE itemID=?", params); Zotero.DB.query("UPDATE annotations SET itemID=? WHERE itemID=?", params);