set db as ready only if migration fully succeeded

This commit is contained in:
azivner 2017-12-12 23:35:41 -05:00
parent 513689b175
commit f71d71104a

View file

@ -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;
}