I am using Springboot and Flyway. The migrations work just fine but I wanted to be able perform a clean
flyway command when the application context gets loaded with test
profile.
Is it possible to configure SpringBoot to do clean
and then migrate
if active profile is test
?
You can overwrite the Flyway autoconfiguration like this:
In Spring Boot 1.3 (current version is 1.3.0.M1, GA release is planned for September), you can use a FlywayMigrationStrategy bean to define the actions you want to run: