Skip to content

Commit

Permalink
Some room to breathe
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleavely committed Apr 26, 2020
1 parent 429c8b7 commit bc2a817
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,15 @@ exports.run = async () => {
// beforeEach()
migrationJob.startedAt = (new Date()).toJSON()
await config.beforeEach(migrationJob)

// Run the migration.
const migrationModule = require(migrationJob.path)
await migrationModule.up(context)

// afterEach()
migrationJob.finishedAt = (new Date()).toJSON()
await config.afterEach(migrationJob)

state.history.push(migrationJob)
}
await config.afterAll(pendingMigrations)
Expand All @@ -88,6 +91,7 @@ exports.run = async () => {
delete job.path
})
await config.storeState(state, context)

return { state, ranMigrations: pendingMigrations }
}

Expand Down

0 comments on commit bc2a817

Please sign in to comment.