Which version and edition of Flyway are you using?
Flyway Community Edition 6.0.7 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)
Which database are you using (type & version)?
Postgres 9.4 & Mysql 5.7
Which operating system are you using?
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
I am new to flyway, so maybe there is a better way to do this, but regardless, this is "nice to have" that I've come across. I searched stack overflow and the existing bugs, but did not find anything related.
Our project has several components, each of which require their own database tables and scripts. I've decided that one way to do this is to create an directory hierarchy and for each specific deployment, the admin can change the flyway.conf file to include the directories for the components that they want.
This results in a very long line of paths for the flyway.locations configuration location that makes it hard to read and organize. I was hoping that there was a way to have each location on a separate line. I was hoping the configuration file was a java properties file and attempted to use a \ at the end of the line and the next directory on the following line. Anyway I've not found a way to do this.
What did you expect to see?
A decipherable error message.
What did you see instead?
Putting a \ at the end of the line and a path on the next line oddly resulted in the following, which is probably another issue:
WARNING: Skipping META-INF.versions.9.org.h2.util.Bits: (UnsupportedClassVersionError: META-INF/versions/9/org/h2/util/Bits has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0)
... (lots of these errors)
openjdk version "1.8.0_212-3-redhat"
OpenJDK Runtime Environment (build 1.8.0_212-3-redhat-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
The flyway documentation states that it supports java 8 (class file version 5.2)
The text was updated successfully, but these errors were encountered:
@philci52 I know this doesn't necessarily address your original request, but you could have a flyway.conf in the root directory of each component, then you could specify relative paths in locations. Would that solve your issue?
If not, could you please share you flyway.conf (or an example of what it looks like)?
@alextercete Thank you for the suggestion. I guess having multiple flyway.conf files requires me to either pass a large number of parameters on the configFiles command line argument or have run flyway once for each component and to ensure that each components versions aren't out of order. For better or worse, all components share the same schema. Anyway, the flyway.locations parameter as its set up now looks like the following:
@alextercete No, sorry because that would include all the components, not just the ones that the administrator would want to install. FWIW, this is a nice to have feature, certainly not any blocker for us using flyway.