Skip to content
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

Closed

Conversation

jmewes
Copy link
Contributor

@jmewes jmewes commented Jul 22, 2024

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:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsupported Database: PostgreSQL 16.3

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 22, 2024
@wilkinsona wilkinsona added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 22, 2024
@wilkinsona wilkinsona added this to the 3.3.x milestone Jul 22, 2024
@wilkinsona wilkinsona self-assigned this Jul 22, 2024
Copy link
Member

@wilkinsona wilkinsona left a 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.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Jul 22, 2024
@jmewes
Copy link
Contributor Author

jmewes commented Jul 22, 2024

In this GitHub issue, a comprehensive list of the new dependencies can be found:

flyway/flyway#3780

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jul 22, 2024
@@ -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).
Copy link
Contributor Author

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

@jmewes
Copy link
Contributor Author

jmewes commented Jul 22, 2024

@wilkinsona,

Thanks for the feedback. I have added another commit with an attempt to clarify the required dependencies.

@wilkinsona
Copy link
Member

Thanks very much, @jmewes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants