Expense Database Documentation
Summary
Expense persistence is owned by one production runtime EF Core DbContext backed conceptually by PostgreSQL, with a design-time factory for migrations and a transition-only derived context for backfill. It stores claims, receipt references, audit, timeline, outbox, and a processed-event ledger. Owned value objects remain part of claim storage.
Audience
Backend developers, database reviewers, QA, architects, DevOps, support, and implementation teams.
Overview
Expense persistence is owned by one production runtime EF Core DbContext backed conceptually by PostgreSQL, with a design-time factory for migrations and a transition-only derived context for backfill. It stores claims, receipt references, audit, timeline, outbox, and a processed-event ledger. Owned value objects remain part of claim storage.
Database map
- Database overview
- Ownership and boundaries
- Expense claim storage
- Receipt reference storage
- Audit and timeline storage
- Outbox storage
- Tenant isolation
- Migrations and seeding
- Indexing and query patterns
- Compatibility and transition
- Data integrity and transactions
- Schema reference
- Database testing guide
The model is Transitional because compatibility identity/backfill and native persistence coexist. SQL, connection details, and operational commands are intentionally excluded.
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/Infrastructure/ExpenseDbContext.csmicroservices/src/expense-service/Infrastructure/Persistence.csmicroservices/src/expense-service/Backfill/ExpenseBackfillTypes.cs
Related Articles
See Also
Keywords
- Expense database
- Database Overview
Revision Information
- Status: Draft
- Last reviewed: 2026-07-16
- Review cycle: Quarterly