Add hint for new dependencies required for Flyway#41574
Closed
jmewes wants to merge 3 commits intospring-projects:mainfrom
Closed
Add hint for new dependencies required for Flyway#41574jmewes wants to merge 3 commits intospring-projects:mainfrom
jmewes wants to merge 3 commits intospring-projects:mainfrom
Conversation
wilkinsona
requested changes
Jul 22, 2024
Member
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.
...-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-initialization.adoc
Outdated
Show resolved
Hide resolved
Contributor
Author
|
In this GitHub issue, a comprehensive list of the new dependencies can be found: |
jmewes
commented
Jul 22, 2024
| === 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). |
Contributor
Author
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
Contributor
Author
|
Thanks for the feedback. I have added another commit with an attempt to clarify the required dependencies. |
wilkinsona
pushed a commit
that referenced
this pull request
Jul 23, 2024
wilkinsona
added a commit
that referenced
this pull request
Jul 23, 2024
Member
|
Thanks very much, @jmewes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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