mirror of
https://github.com/zadam/trilium.git
synced 2025-01-30 10:57:51 +08:00
set db as ready only if migration fully succeeded
This commit is contained in:
parent
513689b175
commit
f71d71104a
1 changed files with 4 additions and 2 deletions
|
@ -70,8 +70,6 @@ async function migrate() {
|
|||
await options.setOption("db_version", mig.dbVersion);
|
||||
});
|
||||
|
||||
sql.setDbReadyAsResolved();
|
||||
|
||||
log.info("Migration to version " + mig.dbVersion + " has been successful.");
|
||||
|
||||
mig['success'] = true;
|
||||
|
@ -86,6 +84,10 @@ async function migrate() {
|
|||
}
|
||||
}
|
||||
|
||||
if (sql.isDbUpToDate()) {
|
||||
sql.setDbReadyAsResolved();
|
||||
}
|
||||
|
||||
return migrations;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue