From 8490da470554bccb9011f28d1f736335d3cae971 Mon Sep 17 00:00:00 2001 From: Patrick Plate Date: Sat, 13 Jun 2026 09:52:22 +0200 Subject: [PATCH] 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/ --- cannamanage-api/pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cannamanage-api/pom.xml b/cannamanage-api/pom.xml index 79980d8..a8db88f 100644 --- a/cannamanage-api/pom.xml +++ b/cannamanage-api/pom.xml @@ -36,6 +36,18 @@ postgresql runtime + + + org.springframework.boot + spring-boot-starter-flyway + org.flywaydb flyway-database-postgresql