Skip to content

Commit

Permalink
fix(reset): regression introduced in check functionality
Browse files Browse the repository at this point in the history
#552 introduced a regression and effectively disfunctioned the reset function, since it
did append just to the actionables within the run context.

It was moved into its own context.

Signed-off-by: Tobias Gurtzick <magic@wizardtales.com>
  • Loading branch information
wzrdtales committed Apr 10, 2018
1 parent f2ea484 commit b94db96
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/commands/run.js
Expand Up @@ -42,7 +42,6 @@ function run (internals, config) {
break;
case 'up':
case 'down':
case 'check':
case 'reset':
if (action === 'reset') internals.argv.count = Number.MAX_VALUE;

Expand All @@ -63,15 +62,22 @@ function run (internals, config) {
if (action === 'up') {
var executeUp = load('up');
executeUp(internals, config);
} else if (action === 'down') {
} else {
var executeDown = load('down');
executeDown(internals, config);
} else {
var executeCheck = load('check');
executeCheck(internals, config);
}
break;

case 'check':
var executeCheck = load('check');

if (folder[1]) {
internals.matching = folder[1];
internals.migrationMode = folder[1];
}

executeCheck(internals, config);
break;
case 'db':
if (folder.length < 1) {
log.info('Please enter a valid command, i.e. db:create|db:drop');
Expand Down

0 comments on commit b94db96

Please sign in to comment.