In our current setup, we apply bug fixes on the master branch and new features in the develop branch. Both bug fixes and new features can require database migrations, but the develop fixes should always be run after the bug fixes. This means that timestamp might not be the ideal solution to order a migration. What other alternatives are there, except a manual number? Manually label your migration causes a lot of conflicts when multiple people work at the same time; you might require to change your number multiple times before a merge.
- Both a manual number and a timestamp, to reduce risk of conflict
Edit: Someone suggested to prefix the timestamp with the semver number used for versioning. Example: 5.1.0-20210101_180203
- Let the timestamp of a develop migration start at the planned release of the develop branch (8 week interval, rolling release schedule)