Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2 MariaDB compatibility mode is not supported #3726

Closed
oujesky opened this issue Aug 4, 2023 · 1 comment
Closed

H2 MariaDB compatibility mode is not supported #3726

oujesky opened this issue Aug 4, 2023 · 1 comment
Labels

Comments

@oujesky
Copy link

oujesky commented Aug 4, 2023

Which version and edition of Flyway are you using?

Flyway Community Edition 9.21.1

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Micronaut Framework integration / Gradle

Which database are you using? (Type & version)

H2 2.2.220

Which operating system are you using?

MacOS

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)

using H2 compatibility mode of MariaDB in the JDBC handle jdbc:h2:mem:testdb;MODE=MariaDB

The MariaDB compatibility mode was introduced in H2 codebase in h2database/h2database@e5bfe39

What did you expect to see?

no error

What did you see instead?
java.lang.IllegalArgumentException: No enum constant org.flywaydb.core.internal.database.h2.H2Database.CompatibilityMode.MariaDB
	at java.base/java.lang.Enum.valueOf(Enum.java:273)
	at org.flywaydb.core.internal.database.h2.H2Database$CompatibilityMode.valueOf(H2Database.java:43)
	at org.flywaydb.core.internal.database.h2.H2Database.determineCompatibilityMode(H2Database.java:95)
	at org.flywaydb.core.internal.database.h2.H2Database.<init>(H2Database.java:65)
	at org.flywaydb.core.internal.database.h2.H2DatabaseType.createDatabase(H2DatabaseType.java:61)
	at org.flywaydb.core.internal.database.base.BaseDatabaseType.createDatabase(BaseDatabaseType.java:125)
	at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:167)
	at org.flywaydb.core.Flyway.migrate(Flyway.java:140)
	at io.micronaut.flyway.AbstractFlywayMigration.runFlyway(AbstractFlywayMigration.java:102)
	at io.micronaut.flyway.AbstractFlywayMigration.forceRun(AbstractFlywayMigration.java:91)
	at io.micronaut.flyway.AbstractFlywayMigration.run(AbstractFlywayMigration.java:66)
	at io.micronaut.flyway.DataSourceMigrationRunner.lambda$onCreated$1(DataSourceMigrationRunner.java:65)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at io.micronaut.flyway.DataSourceMigrationRunner.onCreated(DataSourceMigrationRunner.java:63)
	at io.micronaut.flyway.DataSourceMigrationRunner.onCreated(DataSourceMigrationRunner.java:39)
	at io.micronaut.context.DefaultBeanContext.triggerBeanCreatedEventListener(DefaultBeanContext.java:2360)
	at io.micronaut.context.DefaultBeanContext.postBeanCreated(DefaultBeanContext.java:2337)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2281)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2289)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3056)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:81)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:2958)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2919)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2730)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1693)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:840)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:825)
	at io.micronaut.data.jdbc.config.SchemaGenerator.createSchema(SchemaGenerator.java:102)
	at io.micronaut.data.jdbc.config.$SchemaGenerator$Definition.initialize(Unknown Source)
	at io.micronaut.data.jdbc.config.$SchemaGenerator$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2307)
	... 72 more
@Barry-RG
Copy link
Contributor

Barry-RG commented Aug 7, 2023

Thank you for your issue. I will look at updating the compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants