Flyway Desktop migrations file name structure

LautherLauther Posts: 16 Bronze 2
edited May 17, 2022 8:12PM in Flyway Desktop
Hello,

Flyway handles files following this name structure:
prefixVERSIONseparatorDESCRIPTIONsuffix

Where, "prefix", "separator" and "suffix" can be set in flyway.conf file (or not if you want to work with the default values for them).

More specifically, Flyway Desktop, generates migration files like the following:
V002_20220413203750__Description.sql

Is there any way to change the format Flyway Desktop uses to generate the VERSION part of the file name (I mean the: 002_20220413203750) to something different, for example 1.2. or 1.0.2, etc?

Thanks in advance!

Lauther

Best Answers

  • Peter_LawsPeter_Laws Posts: 273 Silver 2

    Hi Lauther,

     

    Thanks for the question. Yes as you've observed, the default implementation contains a timestamp to maximise the probability that no duplicate migration file names may be created. However this may be more caution that your use case merits, especially if you only have a few people generating migrations.

     

    Happily Flyway Desktop will seeks to match the format of the preceding migration, as shown here. I've removed the timestamp on my most recent migration (003), and the subsequent file name offered by Flyway Desktop when I generate my next migration is 004.

     

     

     

    Hope this helps!

    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • LautherLauther Posts: 16 Bronze 2
    Answer ✓
    Hello Peter_Laws

    That's great!... We are running a project and currently we are in the stage to define standards and processes to work with Redgate Deploy and that was one of the doubts raised by project team... At first glance, yeah, the "out of the box" setting to handle versions of Flyway Desktop seems to be the appropriated, but we wanted to explore alternatives.

    Many thanks for your answer!

    Lauher

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file