Setting your version numbering
Published 16 June 2022
When you generate migration scripts, the version number will automatically be incremented. By default, a timestamp is included to minimize the chance of merge conflicts. If you do not want the timestamp in your versioning, then you can remove it from the generated script. Future version numbers will increment the smallest number by default and will not include the timestamp if it's removed.
If I want to get rid of the timestamp from future versioned migrations, I just entered 003 when I saved the last migration.
The next time it generates a versioned migration, it will just increment the last value. In this case, it would generate V004:
If I used V001.001, the next script would be V001.002.
Make sure you keep the double underscores to separate the version information from the description in the filename.
The versioning is numeric only to conform to the underlying Flyway engine sorting standards, however the description following the double underscore does not have these constraints.