Flyway is a command line tool with lots of options and parameters. Working with those is a pain, but we’ve made this easier in Flyway Desktop 6.5+. In this tip, see how you can add parameters to your Flyway command.
I’ve been working with Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.
There are a lot of options in Flyway that you can use, and we added a dialog in Flyway Desktop to make it easy to construct a command line call. However, we also made the FWD tool work better recently, removing the need to save your changes.
In the migrations tab, I have all my migrations listed, and on the right side, I can see the command that would be run with the Flyway CLI.
If I click “View command”, I can see this command, which has a number of parameters by default.
However, often I want to add other parameters. Below this dialog is the Advanced settings area, which is where we add parameters.
If I click Add parameters, I get a list of all the parameters, and I can type in the list to filter them down. For example, I often want outOfOrder, so if I type “out” I see this listed.
I can select this and then enter a value for the parameter. I showed in a previous tip how you can easily copy migration numbers, which is handy for using in some of these parameter values.
Once I enter a value, I can click “Add parameter”. Of course, if I’ve done something silly, like enter an integer for a true/false value, the GUI tells me.
If I add this, then it’s reflected in the command, which is what I’d copy and paste into some deployment tool like Azure DevOps, GitHub Actions, Octopus Deploy, etc.
Try it out today. If you haven’t worked with Flyway Desktop, download it today. There is a free version that organizes migrations and paid versions with many more features.
I made a quick video showing this as well. You can watch it below, or check out all the Flyway videos I’ve added: