commit ac31012da7665dc28a7205759281d1112edcf89c parent 50d0f5e5c1d1856cc54fe24b7a2c82964d3fd8ee Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 26 Jan 2010 09:41:05 +0000 Fix upgrade error Diffstat:
| M | chrome/content/zotero/xpcom/schema.js | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -142,13 +142,15 @@ Zotero.Schema = new function(){ } var up2 = _updateSchema('system'); - // Update custom tables so that changes are in place before user data migration - this.updateCustomTables(up2); + // Update custom tables if they exist so that changes are in place before user data migration + if (Zotero.DB.tableExists('customItemTypes')) { + this.updateCustomTables(up2); + } Zotero.wait(); var up1 = _migrateUserDataSchema(dbVersion); var up3 = _updateSchema('triggers'); + // Update custom tables again in case custom fields were changed during user data migration if (up1) { - // Update custom tables again in case custom fields were changed during user data migration this.updateCustomTables(); } Zotero.wait();