Blog Post

Friday Flyway Tips–Flyway Parameters

,

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.

Flyway Options

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.

2023-09-18 14_11_01-Window

If I click “View command”, I can see this command, which has a number of parameters by default.

2023-09-18 14_11_08-Window

However, often I want to add other parameters. Below this dialog is the Advanced settings area, which is where we add parameters.

2023-09-18 14_11_19-Window

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.

2023-09-18 14_11_42-Window

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.

2023-09-18 14_11_49-Window

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.

2023-09-18 14_11_57-Window

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.

2023-09-18 14_12_05-Window

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.

Video Walkthrough

I made a quick video showing this as well. You can watch it below, or check out all the Flyway videos I’ve added:

 

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating