Skip to content

Move -all flag usage from drop to down - #522

Merged
dhui merged 1 commit into
golang-migrate:masterfrom
Juneezee:remove-all-from-drop
Mar 14, 2021
Merged

dhui merged 1 commit into
golang-migrate:masterfrom
Juneezee:remove-all-from-drop

Conversation

@Juneezee

Copy link
Copy Markdown
Contributor

The -all flag still exists for drop usage, even though the drop subcommand no longer accepts -all anymore.

@dhui dhui left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The drop command still accepts the -all parameter

@Juneezee

Copy link
Copy Markdown
Contributor Author

@dhui Using migrate v4.14.1, doing the following command

$ migrate -database 'postgresql://postgres:postgres@localhost:5432/db?sslmode=disable' -path migrations/ drop -all

returns the following output

flag provided but not defined: -all
Usage of drop:
  -f	Force the drop command by bypassing the confirmation prompt
  -help
    	Print help informatio

Looking at the source code for drop, it doesn't seem to accept -all flag anymore(?)

@dhui dhui left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry! For some reason I confused down and drop...

Comment thread internal/cli/main.go Outdated
@Juneezee Juneezee changed the title Remove -all from drop subcommand usage Move -all flag usage from drop to down Mar 13, 2021
@Juneezee
Juneezee requested a review from dhui March 13, 2021 07:06
Comment thread internal/cli/main.go Outdated
The `-all` flag usage should be used in `down` only, not `drop`.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@Juneezee
Juneezee requested a review from dhui March 13, 2021 07:23
@dhui
dhui merged commit 707fc52 into golang-migrate:master Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants