I have added Flyway 5.0.2 dependency to my build.gradle and set baseline-on-migrate: true to my application.yml.
I have the /resources/db/migration directory. The baseline entry is created in the flyway_schema_history. I can run migrations in .sql format too. But Flyway does not recognize my migrations in .java files. If I change the .java to .sql and change the content of the file from java to sql then all works fine. In the documentation it doesn't mention any special configuration or anything for the .java format.
How can I get Flyway to recognize my migrations in .java format?
An example java migration I have tried:
package db.migration;
import org.flywaydb.core.api.migration.spring.SpringJdbcMigration;
import org.springframework.jdbc.core.JdbcTemplate;
public class V3__someMigration implements SpringJdbcMigration {
@Override
public void migrate(JdbcTemplate jdbcTemplate) throws Exception {
System.out.println("migration v3");
}
}