Skip to main content

Employee Database Compatibility and Backfill

Summary

The monolith and Employee Service persist separate workforce models during transition. Employee Service uses GUID identifiers; Legacy Labor, Department, and Designation models use numeric identifiers. No Employee Service historical backfill runner or durable legacy-ID mapping object was found.

Audience

  • Solution architects and backend developers
  • QA and DevOps engineers planning cutover evidence

Transition model

The transformation, load, validation, and rollback mechanisms in this diagram are required concepts, not implemented Employee Service tooling.

Compatibility inventory

ConcernEmployee ServiceLegacy monolithClassificationSource
Employee identityGUIDNumericTransitional mismatchEmployee compatibility source and Models/Labor.cs
Organization identityGUIDNumericTransitional mismatchEmployee/monolith organization models
Employee coreAggregate-oriented modelBroad Labor rowSeparate ownership modelssame
OrganizationDepartment and Designation aggregatesMonolith tablesCoexistenceEmployeeDbContext.cs, Data/AppDbContext.cs
Compatibility routesReject numeric identifiers in extracted serviceLegacy controllers accept numeric identifiersClient migration requiredEmployeeCompatibilityEndpoints.cs
Durable legacy mappingNot foundNative numeric identityNot implementedEmployee migrations/snapshot
Historical backfill runnerNot foundSource data existsNot implementedEmployee Service tree and scripts

The Employee context contains a helper that can derive a compatibility reference from employee code for supported integration messages, but it is not a persisted mapping table and is not sufficient evidence of reversible migration. Exact event representation is outside this epic.

Dual-ownership risks and reconciliation

During coexistence, writes routed to different owners can diverge unless an approved synchronization mechanism exists. Cutover should reconcile tenant coverage, identifiers, active state, organization references, profile coverage, counts, and representative API semantics. The reviewed Employee smoke script exercises each API surface but is not a historical data-parity tool.

No direct database-copy instructions are provided. Source access, transformation rules, idempotency, error quarantine, reconciliation thresholds, and rollback authority all Require confirmation.

Source References

  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
  • microservices/src/employee-service/Infrastructure/Migrations/EmployeeDbContextModelSnapshot.cs
  • microservices/src/employee-service/Api/EmployeeCompatibilityEndpoints.cs
  • microservices/src/employee-service/docs/employee-compatibility-placeholders.md
  • microservices/scripts/smoke-employee.ps1
  • Data/AppDbContext.cs
  • Models/Labor.cs
  • Models/Department.cs
  • Models/Designation.cs

See Also

Keywords

  • Legacy coexistence
  • Backfill gap
  • Identifier transition

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly