Expense Database Compatibility and Transition
Summary
Compatibility uses the same Expense aggregate persistence while preserving a unique legacy-compatible numeric identity and legacy-shaped transport contracts. Backfill reads the monolith source, maps deterministic native identity, preserves compatibility identity, and upserts without raising new lifecycle events.
Audience
Backend developers, database reviewers, QA, architects, DevOps, support, and implementation teams.
Confirmed persistence
Compatibility uses the same Expense aggregate persistence while preserving a unique legacy-compatible numeric identity and legacy-shaped transport contracts. Backfill reads the monolith source, maps deterministic native identity, preserves compatibility identity, and upserts without raising new lifecycle events.
Backfill includes dry-run/resume/validation evidence. ExpenseBackfillDbContext derives from ExpenseDbContext and disables store generation for CompatId so a preserved source identifier can be inserted; it otherwise uses the Expense mappings rather than a separate legacy schema. Gateway rollback changes routing only; it does not undo migrated rows, native writes, receipt references, evidence, outbox intent, or downstream projections. System-of-record cutover and reconciliation ownership require confirmation.
Requires confirmation
Production migration governance, retention, archival, masking, performance targets, concurrency roadmap, operational-store access, and rollback ownership remain unconfirmed unless narrowed above.
Source References
microservices/src/expense-service/Backfill/ExpenseClaimBackfill.csmicroservices/src/expense-service/Backfill/ExpenseBackfillValidator.csmicroservices/src/expense-service/Backfill/ExpenseBackfillTypes.csmicroservices/src/expense-service/Infrastructure/ExpenseDbContext.cs
Related Articles
See Also
Keywords
- Expense database
- Compatibility and Transition
Revision Information
- Status: Draft
- Last reviewed: 2026-07-16
- Review cycle: Quarterly