diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 2d8b4dc75..7686271a4 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -131,9 +131,8 @@ Zotero.Schema = new function(){ // If upgrading userdata, make backup of database first if (dbVersion < schemaVersion){ Zotero.DB.backupDatabase(dbVersion); - } - - Zotero.wait(1000); + Zotero.wait(1000); + } Zotero.DB.beginTransaction(); @@ -159,14 +158,14 @@ Zotero.Schema = new function(){ if (Zotero.DB.tableExists('customItemTypes')) { this.updateCustomTables(up2); } - Zotero.wait(); + if(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) { this.updateCustomTables(); } - Zotero.wait(); + if(up1) Zotero.wait(); Zotero.DB.commitTransaction(); }