-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
📢 Modular Flyway V10 (No database found to handle or Unsupported Database) #3780
Comments
Thank you for preemptively opening this issue. I was about to open issue myself when I saw it 🙈 |
It could be cool to update the documentation for common used database ( In my specific case, I've tried for I tried to add Additionally, I would like to have this dependency ONLY during task execution. Except if I'm wrong, the |
@davinkevin Can you please point me to the URL that is still on 9.19? |
https://documentation.red-gate.com/fd/quickstart-gradle-184127577.html 😇 |
10.0 seems to have introduced breaking changes. See flyway/flyway#3780
10.0 seems to have introduced breaking changes. See flyway/flyway#3780
For gradle, you need to follow the documentation. 😄 The dependency MUST be added inside the buildscript. Example for postgresql: buildscript {
dependencies {
classpath "org.flywaydb:flyway-database-postgresql:10.0.0"
}
} |
10.0 seems to have introduced breaking changes. See flyway/flyway#3780
Thanks for calling this out! Not sure how I missed it 🤦 @davinkevin this may solve your issue as well. In our case I had to add parens to the snippet as seen below: buildscript {
dependencies {
classpath("org.flywaydb:flyway-database-postgresql:10.0.0")
}
} |
I confirm it worked for me, but it's not a very good pattern for The best solution would be to declare a dedicated configuration used by the plugin and which can be declared by a dedicated element in the It could be like this for dependencies {
flyway("org.flywaydb:flyway-database-postgresql:10.0.0")
} |
@davinkevin thank you for your suggestion, that is something we may look into |
Hello, adding the dependencies to We're running Flyway in an AWS Lambda using a JAR created with the maven shade plugin. All the dependencies are in the pom.xml as below (we're using version 10.11.1). The database type are present when the lambda is running (we can log their class name). Despite all of this, we keep getting Is there something specific to do for Lambdas? <dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
<version>${flyway.version}</version>
</dependency> |
For Flyway versions higher than 10 with Maven Shade, <transformerimplementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> is needed because it uses Service Loader and no longer Java reflection. From my Stack Overflow question and answer |
I am still getting this error even after adding in the org.flywaydb:flyway-database-postgresql dependency. Please help: build.gradle
|
Signed-off-by: Artem Nefedov <artemnefedov@duck.com>
It has come to our attention that the move to a more modular Flyway in version V10.0.0 may not have been made clear enough in our release notes.
As we attempt to move towards a much wider range of supported databases and database types we have found ourselves needing to extract database support out from
flyway-core
and into their own modules in order to improve maintainability and distribution size.As a result, databases, with the exception of in-memory or file databases such as H2 or SQLite, have been moved into their own packages which need to be added to your project when upgrading to Flyway V10.0.0. This includes whether you are using Flyway as a dependency in your project or using the Gradle or Maven plugins.
The list of additional dependencies can be seen below:
If you are using any of the databases affected, please include the corresponding dependency in your project.
We are expecting that by structuring Flyway in to purposeful dependencies that we can both give developers more control of what aspects of Flyway they include in their project but also allow us to more fluently accept contributions and desired functionality from our community.
For more information on our on going goal to improve Flyway's open source version please see the following blog.
The text was updated successfully, but these errors were encountered: