-
Notifications
You must be signed in to change notification settings - Fork 21
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
Improve the Flyway configuration experience #533
Merged
Merged
Conversation
This file contains 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
FlywayConfigurationProperties is modified to not generate ConfigurationBuilder properties for those FluentConfiguration properties with ambiguous overloaded methods. Those properties are instead directly added to FlywayConfigurationProperties and passed through to the correct FlyentConfiguration builder method. A FlywayConfigurationCustomizer interface is added to allow easy programmatic additions to the configuration, allowing the user to set properties that FlywayConfigurationProperties might not yet support or that involve more complex Flyway types. A default implementation of FlywayConfigurationCustomizer is provided that looks for beans of known Flyway types with an appropriate Named qualifier and sets them on the FluentConfiguration builder as appropriate.
This was
linked to
issues
Mar 25, 2024
timyates
suggested changes
Mar 26, 2024
flyway/src/main/java/io/micronaut/flyway/ValidatePatternTypeConverter.java
Outdated
Show resolved
Hide resolved
flyway/src/test/groovy/io/micronaut/flyway/FlywayConfigurationOverloadedPropertiesSpec.groovy
Outdated
Show resolved
Hide resolved
flyway/src/test/groovy/io/micronaut/flyway/FlywayConfigurationOverloadedPropertiesSpec.groovy
Outdated
Show resolved
Hide resolved
flyway/src/test/groovy/io/micronaut/flyway/FlywayConfigurationOverloadedPropertiesSpec.groovy
Outdated
Show resolved
Hide resolved
timyates
suggested changes
Mar 26, 2024
flyway/src/main/java/io/micronaut/flyway/DefaultFlywayConfigurationCustomizer.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Tim Yates <tim.yates@gmail.com>
Co-authored-by: Tim Yates <tim.yates@gmail.com>
Co-authored-by: Tim Yates <tim.yates@gmail.com>
Co-authored-by: Tim Yates <tim.yates@gmail.com>
Please retry analysis of this Pull-Request directly on SonarCloud |
Quality Gate passedIssues Measures |
timyates
approved these changes
Mar 27, 2024
timyates
reviewed
Mar 27, 2024
flyway/src/main/java/io/micronaut/flyway/ValidatePatternTypeConverter.java
Show resolved
Hide resolved
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.
FlywayConfigurationProperties
is modified to not generateConfigurationBuilder
properties for thoseFluentConfiguration
properties with ambiguous overloaded methods. Those properties are instead directly added toFlywayConfigurationProperties
and passed through to the correctFluentConfiguration
builder method.A
FlywayConfigurationCustomizer
interface is added to allow easy programmatic additions to the configuration, allowing the user to set properties thatFlywayConfigurationProperties
might not yet support or that involve more complex Flyway types.A default implementation of
FlywayConfigurationCustomizer
is provided that looks for beans of known Flyway types with an appropriate@Named
qualifier and sets them on theFluentConfiguration
builder as appropriate.Resolves #365, #417 and #458