Error setting current schema to "public" #995
With the following settings in flyway-gradle-plugin version 3.2.1
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:
Using on H2 DB, my application is running through all migration scripts successfully.
Flyway flyway = new Flyway(); flyway.setDataSource(String.format("jdbc:h2:%s;IFEXISTS=TRUE;MODE=MySQL;FILE_LOCK=NO", dbLocation), "sa", null); flyway.setSchemas("main"); flyway.repair(); flyway.migrate(); // After the migration was completed then try setting back the particular schemas // to avoid the exception but it's still there flyway.setSchemas("public", "PUBLIC"); flyway.baseline();
The current version:
I'm appreciated in your help.