db-migrate / db-migrate/node-db-migrate

Option to reference migrations by SemVer version rather than date

Open
#354 3 comments 0 reactions 1 assignee Claimed by @wzrdtales View on GitHub
feature
Dominant language
JavaScript
Stars
2.3k
Forks
361
PR merge metrics
No merged PRs in 30d

Description

Referencing migrations by date makes some sense, especially if you create migrations rarely and they are published on the date they are created. But for me, migrations happen on git feature branches which are not necessarily merged in the same order they are created. Thus, the date for a migration tends to be less meaningful.

I would prefer to be able to use SemVer to reference my migrations. I would want to update the migration's version when I'm ready to merge its branch. Better yet, I could indicate whether a migration is a bug fix, feature, or breaking, and bumping the version could be done internally.

This would make it possible to do things like only apply bug-fixes or non-breaking changes to a database. Taking it further, projects could reference a database as a dependency by version number, making it easier to integrate into build automation or npm install scripts.

Please consider implementing a feature like this.
##

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31024071-option-to-reference-migrations-by-semver-version-rather-than-date?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.