Skip to content

Making the customise migrations #465

@ayushthakur18

Description

@ayushthakur18

Is your feature request related to a problem? Please describe.
Yes. I tried using the tool to simplify implementing a migration feature, but I faced a few limitations that made the process more complex than expected. The main issue is the lack of built-in support for version-based migrations. Additionally, I couldn't customize the migration file name beyond the description, which restricts flexibility. While I understand the reasoning behind timestamp-based naming, it would be helpful to have some leeway here.

Another challenge is that there's no way to run a specific migration file using a command like --file file-name.js. If the file exists, it should run; if not, it should fail silently or show a meaningful error. These missing features forced me to hack around the tool, which made the overall implementation more complicated than it needed to be.

Describe the solution you'd like

  • Support for version-based migrations alongside timestamp-based ones.
  • Ability to fully customize migration file names.
  • A CLI flag to run a specific migration file (e.g., --file file-name.js).
  • Fallback behavior if the file doesn’t exist (graceful error or silent exit).

Describe alternatives you've considered
I initially built a wrapper around the tool to handle versioning and file-based execution, but this required a lot of manual work and introduced complexity. Eventually, I considered building my own lightweight migration tool tailored to my use case.

Additional context
I really appreciate the work put into this tool—it's powerful and well-designed. These are relatively minor enhancements, but they could significantly improve the developer experience. I’d also love to contribute to adding these features if the maintainers are open to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions