fixed bug where migrations were not processed sequentially

This commit is contained in:
azivner 2017-11-05 18:59:58 -05:00
parent 232ace0c3f
commit ba24281f22

View file

@ -35,7 +35,7 @@ async function migrate() {
}
});
migrations.sort((a, b) => a.db_version - b.db_version);
migrations.sort((a, b) => a.dbVersion - b.dbVersion);
for (const mig of migrations) {
const migrationSql = fs.readFileSync(MIGRATIONS_DIR + "/" + mig.file).toString('utf8');