Leave Database Compatibility and Transition
Summary
The monolith and extracted Leave Service maintain separate persistence models; compatibility routes do not prove synchronized data ownership.
Audience
Architects, backend developers, QA, DevOps, support, and cutover owners.
Concept
| Area | Legacy model | Extracted model | Transition implication | Source |
|---|---|---|---|---|
| Requests | Numeric identity, employee link, integer days, nullable tenant | Numeric identity, employee reference, decimal days, workflow/audit/timeline | Identifier and precision parity require reconciliation | Models/LeaveRequest.cs; microservices/src/leave-service/Domain/Leave/LeaveRequest.cs |
| Balances | Opening/accrued/used/adjusted | Adds carried-forward and encashed values | Net-new columns have no legacy parity | Models/LeaveBalance.cs; microservices/src/leave-service/Domain/Leave/LeaveBalance.cs |
| Calendar | Legacy Holiday/WeeklyOff objects | Leave-owned equivalents; Attendance weekly-off overlap | Calendar ownership and paid metadata need parity tests | Models/Holiday.cs; Models/WeeklyOff.cs |
| Types/policies | Legacy configuration differs | First-class Leave objects | Mapping/backfill is not confirmed | microservices/src/leave-service/Domain/Leave/LeaveConfig.cs |
No source-confirmed synchronization pipeline, backfill runner, reconciliation report, dual-write transaction, or database-level replication was found. Cutover can therefore change which independent store a request observes. Rollback requires explicit ownership and reconciliation decisions; gateway rollback alone does not reconcile divergent data. Direct production database procedures are intentionally excluded.
Source References
- microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
- Data/AppDbContext.cs
- Models/LeaveRequest.cs
- Models/LeaveBalance.cs
- Models/Holiday.cs
- Models/WeeklyOff.cs
- microservices/src/gateway-api/Program.cs
Related Articles
See Also
Keywords
- Monolith coexistence
- Reconciliation
- Cutover boundary
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly