Skip to content

Commit

Permalink
Returning list of run migrations (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolezel authored Mar 7, 2019
1 parent 066bad4 commit 37f5be4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const runner = async options => {

if (!toRun.length) {
log("No migrations to run!");
return;
return [];
}

// TODO: add some fancy colors to logging
Expand All @@ -221,6 +221,12 @@ const runner = async options => {
} else {
await runMigrations(toRun, "apply", options.direction);
}

return toRun.map(m => ({
path: m.path,
name: m.name,
timestamp: m.timestamp
}));
} finally {
db.close();
}
Expand Down

0 comments on commit 37f5be4

Please sign in to comment.