Fix upgrade error

This commit is contained in:
Dan Stillman 2010-01-26 09:41:05 +00:00
parent 50d0f5e5c1
commit ac31012da7

View file

@ -142,13 +142,15 @@ Zotero.Schema = new function(){
} }
var up2 = _updateSchema('system'); var up2 = _updateSchema('system');
// Update custom tables so that changes are in place before user data migration // Update custom tables if they exist so that changes are in place before user data migration
this.updateCustomTables(up2); if (Zotero.DB.tableExists('customItemTypes')) {
this.updateCustomTables(up2);
}
Zotero.wait(); Zotero.wait();
var up1 = _migrateUserDataSchema(dbVersion); var up1 = _migrateUserDataSchema(dbVersion);
var up3 = _updateSchema('triggers'); var up3 = _updateSchema('triggers');
// Update custom tables again in case custom fields were changed during user data migration
if (up1) { if (up1) {
// Update custom tables again in case custom fields were changed during user data migration
this.updateCustomTables(); this.updateCustomTables();
} }
Zotero.wait(); Zotero.wait();