commit 0cc3e64b8a7f6e98e51629cfde66b461fef541a3 parent 0e3071576b0b0accc7eb9254e4661603bfd91ebf Author: Dan Stillman <dstillman@zotero.org> Date: Sat, 14 Apr 2018 11:38:54 -0400 Restore proper incompatible DB message Fixes #1446 Diffstat:
| M | chrome/content/zotero/xpcom/schema.js | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -1549,8 +1549,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 + ); } let sql = yield _getSchemaSQL(schema); yield Zotero.DB.executeSQLFile(sql);