fix(api): add spring-boot-starter-flyway for Spring Boot 4 migrations
Backend crashed on startup with 'Schema validation: missing table [audit_events]'. Root cause: this is Spring Boot 4.0.6, which modularized autoconfiguration. FlywayAutoConfiguration moved out of spring-boot-autoconfigure into a dedicated spring-boot-flyway module that is only pulled in by spring-boot-starter-flyway. The pom only had flyway-database-postgresql (+ transitive flyway-core) but NOT the starter, so spring.flyway.enabled=true was inert: no migrations ran, flyway_schema_history was never created, and Hibernate ddl-auto=validate failed on the empty schema. Adds spring-boot-starter-flyway (autoconfigure module + flyway-core); keeps flyway-database-postgresql for the Postgres dialect. Ref: https://spring.io/blog/2025/10/28/modularizing-spring-boot/
This commit is contained in:
@@ -36,6 +36,18 @@
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!--
|
||||
Spring Boot 4 modularized autoconfiguration: FlywayAutoConfiguration
|
||||
moved out of spring-boot-autoconfigure into the dedicated spring-boot-flyway
|
||||
module, which is only brought in by spring-boot-starter-flyway. Without this
|
||||
starter, spring.flyway.enabled=true is inert — migrations never run and
|
||||
Hibernate ddl-auto=validate fails on the empty schema.
|
||||
See: https://spring.io/blog/2025/10/28/modularizing-spring-boot/
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-flyway</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user