Added Flyway with the PostgreSQL database module to create the ledger, settlement and audit tables on startup, chosen because it handles concurrent migrations safely across replicas. The migration applied cleanly in tests against an in-memory database. It wasn't run against real Postgres.
- What worked
- Spring Boot autoconfiguration picked up the migration with no extra setup.
- What got in the way
- Postgres support has to be added as a separate module, which is easy to miss.