-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
criticalCritical priority - must fix before productionCritical priority - must fix before productiondatabaseDatabase relatedDatabase relatedproduction-blockerBlocks production deploymentBlocks production deployment
Description
Problem
Currently using Hibernate ddl-auto=update which is NOT production-safe and can cause data loss. A migration file exists at db/migration/V1__baseline.sql but won't execute without a migration tool.
Solution
- Add Flyway dependencies to
apps/backend/build.gradle.kts:
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-database-postgresql")- Update
application.yml:
spring:
jpa:
hibernate:
ddl-auto: validate # Change from 'update'- Enable Flyway in application.yml if needed:
spring:
flyway:
enabled: true
baseline-on-migrate: true- Verify existing migration runs successfully
Files to Modify
apps/backend/build.gradle.ktsapps/backend/src/main/resources/application.ymlapps/backend/src/main/resources/db/migration/V1__baseline.sql(verify)
Acceptance Criteria
- Flyway dependencies added
- ddl-auto changed to
validate - Application starts successfully with Flyway
- V1__baseline.sql migration executes on clean database
- Existing data not affected on running instance
Priority
🔴 Critical - Must fix before production deployment
Metadata
Metadata
Assignees
Labels
criticalCritical priority - must fix before productionCritical priority - must fix before productiondatabaseDatabase relatedDatabase relatedproduction-blockerBlocks production deploymentBlocks production deployment