Store lastCompatibleVersion during schema initialization

Otherwise switching back to release from beta doesn't show the last-used
version if the beta hasn't gone through at least one
compatibility-breaking schema update.
This commit is contained in:
Dan Stillman 2021-06-21 01:14:44 -04:00
parent e285415451
commit 42b4b173f3

View file

@ -2214,7 +2214,6 @@ Zotero.Schema = new function(){
yield _getSchemaSQLVersion('triggers').then(function (version) {
return _updateDBVersion('triggers', version);
});
yield _updateDBVersion('compatibility', _maxCompatibility);
var sql = "INSERT INTO libraries (libraryID, type, editable, filesEditable) "
+ "VALUES "
@ -2222,6 +2221,7 @@ Zotero.Schema = new function(){
yield Zotero.DB.queryAsync(sql, userLibraryID);
yield _updateLastClientVersion();
yield _updateCompatibility(_maxCompatibility);
self.dbInitialized = true;
})