Comments (6)
That sounds reasonable to me. On the Boot side, perhaps we should consider some failure analysis for the exception that Flyway throws as well?
from start.spring.io.
The test and the app fails and this is not the only case where this happens.
We are usually trying to avoid any kind of scaffolding here and we generally favor clear exceptions (you have to do something) vs generating code to make things work and "hide" important information from you. We also absolutely don't want to be in a situation where we generate too much stuff and users have to manually remove what we've generated as we thought would be a convenience to them.
I am torn on this particular use case though, flagging for team attention.
from start.spring.io.
I think it's worth noting that, IIRC, this is only the case in recent versions of Flyway. Previously, it would silently do nothing if it didn't find any migrations to run. That leads me to believe that the Flyway team now think it's better to fail and guide the user towards creating a migration than to silently do nothing. I'm inclined to agree with them.
from start.spring.io.
Perhaps we could generate the src/main/resources/db/migration
folder though?
from start.spring.io.
I think that's a good way to go. I always have my training students run the contextLoads
test after generation to make sure everything was imported, etc., correctly. When it failed, it wasn't immediately clear how to fix it as Flyway's docs don't mention an empty project -- but that's something they need to do if they're going to throw an exception.
from start.spring.io.
So it looks like Boot is the one complaining as part of autoconfigure (see https://github.com/spring-projects/spring-boot/blob/2.1.x/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java#L191)
For adding Flyway to an existing Boot project that already has database schemas, etc., that check makes sense, but for a newly generated project, it's confusing ("how can I write a migration when I don't have any code yet?"). I feel like there needs to be better guidance, though I agree that generating an empty migration, which then has to be modified or thrown away, might not be best.
from start.spring.io.
Related Issues (20)
- Choose Java 22, but pom.xml show Java 21 <java.version>21</java.version> HOT 1
- Inconsistent Display of Remove Dependency Button on Spring Initializr HOT 3
- Choosing OAuth2 Client and Thymeleaf together should add the dependency thymeleaf-extras-springsecurityX as well HOT 1
- Spring Boot 3.2 projects use defunct Wavefront starter
- Upgrade to Spring Boot 3.3.2
- Upgrade to Spring Cloud Azure 5.15.0
- Generated project with Gradle+Kotlin+JPA does not build HOT 6
- Add htmx-spring-boot as a possible dependency HOT 2
- Set Vaadin's launch-browser property automatically HOT 1
- Upgrade to spring-java-format 0.0.43
- Upgrade to cyclonedx-gradle-plugin 1.10.0 HOT 1
- Upgrade to Spring Cloud 2024.0.0-M1 HOT 1
- Add JTE as template Engine HOT 3
- Add DGS testing dependency automatically for DGS apps
- Update Maven to 3.9.9
- Upgrade to Spring Boot 3.3.3
- Upgrade to Netflix DGS 9.1.0
- Upgrade to DGS Codegen Maven plugin 1.61.5
- Upgrade to Spring Cloud GCP 5.6.0
- Upgrade to Spring Cloud Azure 5.16.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from start.spring.io.