Redgate Flyway

Looking forward to Flyway V13

We're looking ahead to Flyway V13 and there are some changes coming that we want to share with you.

initSQL is being removed

The initSQL parameter is an outlier and it's purpose:

SQL statements to be run immediately after a database connection has been established

fits much more consistently into a callback.

You can see a tutorial about creating a SQL Callback here. To adapt this, you would put whatever you specified in initSQL into a file called afterConnect.sql instead.

Change of createSchema Callback

We're renaming createSchema to beforeCreateSchema to make it more consistent with the other callbacks. If you have a createSchema.sql callback, you will need to rename it to beforeCreateSchema.sql and update any references to it in your configuration.


Flyway v13 will require Java 21

Minimum Java version (language level) moving from 17 to 21,

  • The Java 21 LTS has been available since Sept 2023
  • There is broad ecosystem support
  • Spring Boot 3.x already requires 17+

Impact

This does not affect the majority of CLI users as the Flyway download comes bundled with a JRE (Java Runtime Environment) and so it is an invisible transition. It is possible to use Flyway CLI with your own JRE and so this will need to support Java 21 but this is not a common Flyway configuration.  

This does affect API users, Maven/Gradle plugin users, plugin authors, database driver developers

What to do

Upgrade to Java 21+ before adopting v13; Java 17 will continue to work with Flyway v12.x


Didn't find what you were looking for?