Skip to content

Commit

Permalink
Restore proper incompatible DB message
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman authored and fbennett committed Apr 15, 2018
1 parent 973555d commit 306b971
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions chrome/content/zotero/xpcom/schema.js
Expand Up @@ -1657,8 +1657,13 @@ Zotero.Schema = new function(){
return false;
}
if (dbVersion > schemaVersion) {
throw new Error("Zotero '" + schema + "' DB version (" + dbVersion
+ ") is newer than SQL file (" + schemaVersion + ")");
let dbClientVersion = yield Zotero.DB.valueQueryAsync(
"SELECT value FROM settings WHERE setting='client' AND key='lastCompatibleVersion'"
);
throw new Zotero.DB.IncompatibleVersionException(
`Zotero '${schema}' DB version (${dbVersion}) is newer than SQL file (${schemaVersion})`,
dbClientVersion
);
}
var sql = yield _getSchemaSQL(schema);
yield Zotero.DB.executeSQLFile(sql);
Expand Down

0 comments on commit 306b971

Please sign in to comment.