Restore DB table reconciliation during integrity check

But skip it at startup, even if flagged on, if there are schema update
steps to perform, to avoid creating tables that aren't expected to exist
yet.

Originally added in 5b9e6497a but disabled in c4cc44528 and 7a434df53
This commit is contained in:
Dan Stillman 2021-01-17 03:30:00 -05:00
parent a2dc7f23cd
commit 9152012368
4 changed files with 38 additions and 23 deletions

View file

@ -367,6 +367,13 @@ function ZoteroService() {
zContext.Zotero.startupErrorHandler();
}
else if (zContext.Zotero.startupError) {
// Try to repair the DB on the next startup, in case it helps resolve
// the error
try {
zContext.Zotero.Schema.setIntegrityCheckRequired(true);
}
catch (e) {}
try {
zContext.Zotero.startupError =
zContext.Zotero.Utilities.Internal.filterStack(