Spring Boot 4.0 Flyway auto-configuration is not triggering in the CI
environment — confirmed by empty DB and no flyway_schema_history table.
Replace YAML-based auto-config with an explicit @Bean that creates and
runs Flyway directly on startup, independent of any auto-configuration
conditions. Disable the auto-config via spring.flyway.enabled=false to
prevent interference. Add @DependsOn("flyway") to DataInitializer to
enforce that CommandLineRunner beans are only registered after migrations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
57 lines
1.0 KiB
YAML
57 lines
1.0 KiB
YAML
spring:
|
|
application:
|
|
name: Familienarchiv
|
|
|
|
datasource:
|
|
url: ${SPRING_DATASOURCE_URL}
|
|
username: ${SPRING_DATASOURCE_USERNAME}
|
|
password: ${SPRING_DATASOURCE_PASSWORD}
|
|
driver-class-name: org.postgresql.Driver
|
|
|
|
flyway:
|
|
enabled: false # Managed explicitly via FlywayConfig bean
|
|
|
|
jpa:
|
|
hibernate:
|
|
ddl-auto: none
|
|
properties:
|
|
hibernate:
|
|
dialect: org.hibernate.dialect.PostgreSQLDialect
|
|
show-sql: false
|
|
|
|
servlet:
|
|
multipart:
|
|
max-file-size: 50MB
|
|
max-request-size: 50MB
|
|
|
|
springdoc:
|
|
api-docs:
|
|
enabled: false
|
|
swagger-ui:
|
|
enabled: false
|
|
|
|
app:
|
|
s3:
|
|
endpoint: ${S3_ENDPOINT}
|
|
access-key: ${S3_ACCESS_KEY}
|
|
secret-key: ${S3_SECRET_KEY}
|
|
bucket: ${S3_BUCKET_NAME}
|
|
region: ${S3_REGION}
|
|
|
|
admin:
|
|
username: ${APP_ADMIN_USERNAME:admin}
|
|
password: ${APP_ADMIN_PASSWORD:admin123}
|
|
|
|
import:
|
|
col:
|
|
index: 0
|
|
box: 1
|
|
folder: 2
|
|
sender: 3
|
|
receivers: 5
|
|
date: 7
|
|
location: 9
|
|
tags: 10
|
|
summary: 11
|
|
transcription: 13
|