You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
With the following settings in flyway-gradle-plugin version 3.2.1
url = "jdbc:h2:mem;MODE=MySQL"
user = "sa"
schemas = ["PUBLIC"]
I get the following error: Error setting current schema to "public"
What was strange about this error was when I turned on debug I could see the PUBLIC schema get populated with the schema_version table and the migrations ran without error. The plugin reported the error after running almost to completion.
Tacking INIT=CREATE SCHEMA IF NOT EXISTS "public" to the end of the url worked as a work around.
The text was updated successfully, but these errors were encountered:
There are still some issues with h2 and the various db compatibility modes. In the future we want to provide the possibility to override the db autodetection with a specific db type, which would most likely fix this.
Using on H2 DB, my application is running through all migration scripts successfully.
But I'm still experiencing in this issue. here below is my snippet code:
Flywayflyway = newFlyway();
flyway.setDataSource(String.format("jdbc:h2:%s;IFEXISTS=TRUE;MODE=MySQL;FILE_LOCK=NO", dbLocation), "sa", null);
// After the migration was completed then try setting back the particular schemas// to avoid the exception but it's still thereflyway.setSchemas("public", "PUBLIC");
org.flywaydb.core.api.FlywayException: Error setting current schema to "public"