From 65f493471f501e013b62f9525cccd8e292de061f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 15 Mar 2010 07:16:05 +0000 Subject: [PATCH] Work around an SQLite limit that can cause a 1.0->2.0 upgrade error in very rare cases (in code from July 2008) --- chrome/content/zotero/xpcom/schema.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 0f0029d6e..54394966c 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -1978,12 +1978,25 @@ Zotero.Schema = new function(){ var rows = Zotero.DB.columnQuery("SELECT GROUP_CONCAT(valueID) FROM itemDataValues GROUP BY value HAVING COUNT(*) > 1"); for each(var row in rows) { var ids = row.split(','); + var id = parseInt(ids[0]); var deleteIDs = []; for (var j=1; j