Closed jhuliano closed 3 years ago
So as you mention yourself: this removes a safety check.
Most people will blindly use the flag and screw things up, rather than figuring out what went wrong.
Not sure this is a good idea.
@rubenv I see, but on the other hand there are also valid use-cases for it, otherwise it wouldn't even be part of the codebase, I guess.
Up to you, feel free to close the PR if you don't like the idea.
Thought it could be helpful to add the "ignoreunknown" option as a flag on the CLI. I only added it to the
up
command, but for consistency, we could also add it to other commands likedown
.The use case is that when I do a deployment for my service the first thing I do is running the DB migration (
sql-migrate up
), but, if I want to rollback the deployment (or redeploy the previous version for that matter) thesql-migration up
would throw an error in case a new migration existed. The flag would address this case .