Closed hdon closed 5 years ago
Hi @hdon, make
is not a command in this tool. To see how it works I suggest using migrate --help
. Good luck!
@wesleytodd I think that the issue was that migrate
didn't raise an error, and exited with a 0
status code, instead of raising an error and setting a failure status code :relaxed:
Opening for now, but feel free to close if I'm wrong 🐎
Right, but this is related to the other issue, because what it is running is the "default" command up
, but make
is not a valid migration. So because previously that was not an error case it would not exit with an error code.
That being said, I am not sure we have good test coverage of exit codes, so that might be a good area to look at.
@LinusU is correct.
I chose the example of "make" because it's the exact mistake I made to discover the confusing behavior.
@wesleytodd so in addition to not erroring, it also migrated all the way up? :scream:
Yeah, so the fix is to error when you try to run with a migration name which does not exist. We can close this in favor of #156, because it is really the same issue.
Yeah, that would be better. Though IMHO it's better for tools to ask you to be more explicit. I think defaulting to "up" is not really saving anyone any effort but some will get tripped up by the automatic "up" behavior.
@hdon I agree, maybe we should also change that behavior. That was also the pre-1.0 behavior. Want to open a new issue to make that recommendation?
Giving
migrate
an invalid command does not issue an error and exits normally:Note:
migrate make first_migration
is not a validmigrate
command.