I am trying to implement DB migration with Flyway 4.2.0 + Oracle 11g
I have this empty schema:
And when I try to migrate, Flyway says:
Caused by:
org.flywaydb.core.api.FlywayException
: Found non-empty schema(s) "PASHA
" without metadata table! Usebaseline()
or setbaselineOnMigrate
totrue
to initialize the metadata table.
This is the config:
@Bean(initMethod = "migrate")
Flyway flyway() {
Flyway flyway = new Flyway();
flyway.setBaselineOnMigrate(false);
flyway.setSchemas("PASHA");
flyway.setLocations("classpath:db/migration/oracle");
flyway.setDataSource("jdbc:oracle:thin:@host:1521:test", "login", "password");
return flyway;
}
Why do I get this message? My base is empty.