Skip to content

Commit

Permalink
refactor(provider): register ace commands on provider boot
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 1, 2017
1 parent a1086d9 commit 33dece6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions providers/MigrationsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@ class MigrationsProvider extends ServiceProvider {
this._registerMigration()
this._registerCommands()
}

/**
* On boot add commands with ace
*
* @method boot
*
* @return {void}
*/
boot () {
const ace = require('@adonisjs/ace')
ace.addCommand('Adonis/Src/Migration:Run')
ace.addCommand('Adonis/Src/Migration:Rollback')
ace.addCommand('Adonis/Src/Migration:Refresh')
ace.addCommand('Adonis/Src/Migration:Reset')
}
}

module.exports = MigrationsProvider

0 comments on commit 33dece6

Please sign in to comment.