Migrate: Add an option to assume "yes" to all prompts

Created on 10 Apr 2020  路  2Comments  路  Source: golang-migrate/migrate

Is your feature request related to a problem? Please describe.
I want to run the migrate down command non-interactively in an automation script. But it prompts Are you sure you want to apply all down migrations? [y/N] and there's no option to bypass this.

Describe the solution you'd like
Add an option to the CLI, e.g. -yes, to assume "yes" to all prompts.

Describe alternatives you've considered
Running echo y | migrate down ....

Most helpful comment

use -all

This brings up a good point though. We should include help for sub-commands.

All 2 comments

use -all

This brings up a good point though. We should include help for sub-commands.

Created a new issue to track this: https://github.com/golang-migrate/migrate/issues/372

Was this page helpful?
0 / 5 - 0 ratings