KRYSTALM7 opened a new issue, #158: URL: https://github.com/apache/fineract-loan-origination/issues/158
## Problem The LOS database is currently being managed through Hibernate schema generation rather than Flyway migrations. The repository contains Flyway migration files, but the running database does not contain the expected `flyway_schema_history`. ## Root Cause The project includes Flyway migration files but does not currently configure Flyway correctly for the running Spring Boot setup. The application currently relies on: `ddl-auto: update` instead of validating a schema produced by migrations. There are also duplicate migration version concerns that need to be resolved before Flyway is enabled. ## Impact Database schema changes are not reliably version-controlled. A fresh environment may not reproduce the same schema as an existing environment. This also makes deployment and rollback less deterministic. ## Proposed Fix - Enable Flyway correctly. - Resolve duplicate migration versions. - Apply all migrations successfully to a clean database. - Change Hibernate to `ddl-auto: validate`. - Ensure application startup fails when the schema does not match migrations. ## Acceptance Criteria - [ ] Fresh database can be initialized entirely through Flyway. - [ ] `flyway_schema_history` exists. - [ ] All migrations execute successfully. - [ ] Duplicate migration versions are resolved. - [ ] Hibernate runs with `ddl-auto: validate`. - [ ] Application starts successfully against the migrated schema. ## Regression Tests - [ ] Testcontainers starts with an empty database. - [ ] Flyway applies all migrations. - [ ] Application starts with schema validation enabled. ## Dependencies None -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
