0

When upgrading org.flywaydb:flyway-core:9.22.3 to 10.15.2 I seem to be forced to add a database specific dependency.

We are using H2 for testing and PostgreSQL in production.

I was able to get production working by adding a dependency to

org.flywaydb:flyway-database-postgresql:10.15.2

However, I am getting this exception when I run our build:

org.flywaydb.core.api.FlywayException: Unsupported Database: H2 2.2
at org.flywaydb.core.internal.database.DatabaseTypeRegister.lambda$getDatabaseTypeForConnection$7(DatabaseTypeRegister.java:122)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForConnection(DatabaseTypeRegister.java:122)
at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:77)
at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:138)
at org.flywaydb.core.Flyway.repair(Flyway.java:401)

I wouldn't mind adding a similar dependency for H2, but I don't seem to be able to find it on Maven central.

What do I need to do to be able to upgrade to Flyway 10.15.2 and still be able to use H2 for testing?

1 Answer 1

-1

According to this: You should add flyway-core to your maven dependencies

1
  • I have flyway-core as a dependency as well as the postgresql dependency. With them, I get the exception in my question. Commented Jul 10 at 10:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.