Skip to content

Report: --migration.folder Flag Not Working #11

Description

@joeariasc

Description

The --migration.folder flag does not work as documented for the go tool db commands. According to the documentation, this flag should allow users to specify a custom location for migration files, but it appears to be non-functional.

Affected Commands

  • go tool db generate_migration
  • go tool db migrate

Actual Behavior

The --migration.folder flag does not work, obtaining this output:

go tool db generate_migration create_users_table --migration.folder=internal/infrastructure/migrations
Usage of /Users/user/Library/Caches/go-build/3e/3e67624e8785a68cd8b78066b0f2b59cdeb5023524dd6bb8a6522a651b4e4e05-d/db:
unknown flag: --migration.folder

Environment

  • Go version: 1.25.0
  • OS: Mac Tahoe 26.1
  • Tool version: v0.1.8

Activity

  1. joeariasc commented on Nov 10, 2025

    @joeariasc
    Author

    @tatang26 👆🏽

  2. tatang26 commented on Nov 10, 2025

    @tatang26
    Contributor

    Great catch @joeariasc !
    There is a mismatching in the flag package used throughout the different files which is causing the command arguments to load incorrectly.

    I've created the #12 to fix this.
    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions