openrewrite / openrewrite/rewrite-spring
2.4-2.5: Flyway and Liquibase JDBC URLs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 403
- Forks
- 149
- Avg merge
- 2h 33m
- Merged PRs (30d)
- 10
Description
may-require: openrewrite/rewrite/issues/1315
Release Notes
If you currently define a spring.flyway.url or spring.liquibase.url you may need to provide additional username and password properties. In earlier versions of Spring Boot, these settings were derived from spring.datasource properties but this turned out to be problematic for people that provided their own DataSource beans.
Condition
Recipe is applicable if
- flyway or liquibase dependency is found on classpath OR (maybe better) flyway or liquibase config files are found (blocked-by openrewrite/rewrite/issues/1324)
- Just checking the existence of named properties is not guaranteed to be sufficient as these might theoretically be provided as env and not exist in any properties file
Description
tool = [flyway|liquibase]
The recipe found a dependency to ${tool}.
If you are using credentials to run the database migrations using ${tool} you should provide the database credentials:
spring.${tool}.userandspring.${tool}.password
Resources
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the condition and description in this issue, then review the linked OpenRewrite issues 1315 and 1324 for dependency and configuration detection context. Done means defining the Flyway and Liquibase migration-credential guidance while resolving the stated applicability questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100