There are three ways you can hook into the Flyway API.
The first one is the the most common one: Java-based Migrations when you need more power than SQL can offer you. This is great to for dealing with LOBs or performing advanced data transformations.
This can be achieved by implementing the JdbcMigration interface.
Alternatively Spring users may prefer to implement the SpringJdbcMigration interface to gain access to a Spring JdbcTemplate instead of a plain JDBC connection.
Building upon that are the Java-based Callbacks when you need more power or flexibility in a Callback than SQL can offer you.
This can be achieved by implementing the FlywayCallback interface.
For your convenience, you can also subclass
which already contains no-op implementations of all the methods of the
These can then be used for loading things like CSV-based migrations or other custom formats.
By using the skipDefaultResolvers property, these custom resolvers can also be used to completely replace the built-in ones (by default, custom resolvers will run in addition to built-in ones).