Skip to content

Commit

Permalink
refactor: log message when performing version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Mar 3, 2022
1 parent cb15d56 commit 454ecb2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions commands/Migration/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ export default abstract class MigrationsBase extends BaseCommand {
this.logger.logUpdatePersist()
})

/**
* Migration completed
*/
migrator.on('upgrade:version', ({ from, to }) => {
this.logger.info(`Upgrading migrations version from "${from}" to "${to}"`)
})

migrator.on('start', () => (start = process.hrtime()))
migrator.on('end', () => (duration = process.hrtime(start)))

Expand Down

0 comments on commit 454ecb2

Please sign in to comment.