Add hint for new dependencies required for Flyway#41574
Conversation
wilkinsona
left a comment
There was a problem hiding this comment.
Thanks for the PR, @jmewes. I've left a comment for your consideration when you have a minute.
|
In this GitHub issue, a comprehensive list of the new dependencies can be found: |
| === 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.
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