-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Add hint for new dependencies required for Flyway #41574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @jmewes. I've left a comment for your consideration when you have a minute.
...-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc
Outdated
Show resolved
Hide resolved
In this GitHub issue, a comprehensive list of the new dependencies can be found: |
@@ -98,6 +98,7 @@ Spring Boot supports two higher-level migration tools: https://flywaydb.org/[Fly | |||
=== Execute Flyway Database Migrations on Startup | |||
|
|||
To automatically run Flyway database migrations on startup, add the `org.flywaydb:flyway-core` to your classpath. | |||
All databases that are not in-memory or file based need an additional dependency, e.g. `org.flywaydb:flyway-database-postgresql` is requiredd for PostgreSQL and `org.flywaydb:flyway-mysql` is required for MySQL (see https://documentation.red-gate.com/flyway/flyway-cli-and-api/supported-databases[Supported Databases in the Flyway Documentation] for details). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. -- flyway/flyway#3780
Thanks for the feedback. I have added another commit with an attempt to clarify the required dependencies. |
Thanks very much, @jmewes. |
After following the documentation in https://docs.spring.io/spring-boot/how-to/data-initialization.html#howto.data-initialization.migration-tool.flyway for the setup of Flyway, I got the following error after attempting the app startup:
It turns out that with Spring Boot 3.3, Flyway was upgraded to version 10 which requires an additional dependency for Posgres and some other databases:
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.3-Release-Notes#flyway-10
This PR is intended to provide a hint about this additional dependency in the documentation linked above.
Also see openrewrite/rewrite-spring#532