flyway icon indicating copy to clipboard operation
flyway copied to clipboard

warning for Oracle database version

Open xlisden opened this issue 10 months ago • 5 comments

Which version and edition of Flyway are you using?

Flyway Community Edition 11.9.1 by Redgate

If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Gradle plugin

Which database are you using? (Type & version)

Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production

Which operating system are you using?

Windows 11

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

I ran the application with flyway-database-oracle dependency, and flyway-gradle-plugin. I was trying to start the migration, but...

What did you expect to see?

I expect to not see any warnings about version, because since version 10.+ it says Oracle 21 is supported https://documentation.red-gate.com/fd/supported-databases-and-versions-143754067.html

What did you see instead?

Caused by: org.flywaydb.core.api.FlywayException: Unsupported Database: Oracle 21.0 at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForConnection(DatabaseTypeRegister.java:105) ~[flyway-core-10.10.0.jar:na] at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.(JdbcConnectionFactory.java:73) ~[flyway-core-10.10.0.jar:na] at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:134) ~[flyway-core-10.10.0.jar:na] at org.flywaydb.core.Flyway.migrate(Flyway.java:147) ~[flyway-core-10.10.0.jar:na] at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[spring-boot-autoconfigure-3.3.11.jar:3.3.11] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853) ~[spring-beans-6.1.19.jar:6.1.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1802) ~[spring-beans-6.1.19.jar:6.1.19] ... 19 common frames omitted

I also tried changing implementation 'org.flywaydb:flyway-core' for implementation 'org.flywaydb:flyway-database-oracle'

xlisden avatar Jun 10 '25 23:06 xlisden

Hi @xlisden , To connect to oracle, you will need both dependencies: flyway-core and flyway-database-oracle.

JasonLuo-Redgate avatar Jun 11 '25 12:06 JasonLuo-Redgate

Thanks for thw answer!

Well, it is true that no error. But the tables aren't created (my url, user and password are correct). I tried incorrect credentials to see if it caused an error, but nothing. My user has permission to create tables. With Liquidbase it works.

xlisden avatar Jun 11 '25 16:06 xlisden

Could you share the new debug log?

JasonLuo-Redgate avatar Jun 11 '25 16:06 JasonLuo-Redgate

When trying to activate the logs on logging: level: flyway: DEBUG

I got this: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Found non-empty schema(s) "mynamesschema" but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table.

I add baseline-on-migrate: true on my application.yml, but only create table flyway_schema_history :ccc And dont have logs

xlisden avatar Jun 11 '25 17:06 xlisden

Hi @xlisden ,

Could you provide more information about your operation - did you run migrate and what is the output of your migrate operation?

JasonLuo-Redgate avatar Jun 12 '25 14:06 JasonLuo-Redgate