Closed thalesmello closed 7 years ago
@thalesmello Thanks for the PR! I have one question. In the CLI for the db:migrate:undo function you have [name] as an optional argument. It should be [number of migrations to undo] right? Because you have Number.isNumber() to check that value.
@dmanjunath
It's actually a hybrid interface.
If the parameter the filename of one of the migrations, it passes it down to the node-migrate
package, which in turn defines it as the state it has to rollback to.
If the parameter is an integer, then the logic inside uses that number to calculate the filename that correspond to that number of iterations.
I've included a few commits explaining how it works, also improving documentation.
@thalesmello I see what you did. Thanks for the comments. I'll merge this branch on
This pull request allows the user to specify the number of migrations to undo.