Skip to main content

Employee Database

Summary

This section documents the Employee Service persistence model verified from EF Core configuration, migrations, the current model snapshot, domain entities, repositories, query code, and relevant legacy source. It does not expose connection details, production database identifiers, event payloads, or operational runbooks.

Audience

  • Backend developers and QA engineers
  • Solution architects and DevOps engineers
  • Support engineers working with safe consistency concepts

Overview

Employee Service owns a PostgreSQL-backed EF Core model in the employee schema. EmployeeDbContext persists the Employee aggregate, departments, designations, audit history, timeline entries, and transactional outbox records. The monolith retains separate Legacy persistence during transition; no shared-table ownership is assumed.

Scope and model

CategoryConfirmed scopePage
ArchitectureContext, repositories, unit of work, providerDatabase overview
OwnershipService and data boundariesOwnership and boundaries
Employee aggregateRoot, owned employment values, child collectionsEmployee aggregate storage
OrganizationDepartments, designations, logical assignmentsOrganization storage
ProfileContact, profile, bank, document-reference storageProfile and contact storage
HistoryTimeline and technical auditAudit and timeline storage
MessagingTransactional outbox storageOutbox storage
IsolationTenant identifiers and query filtersTenant isolation
EvolutionMigrations and development seedingMigrations and seeding
ReadsIndexes, search, paginationIndexing and query patterns
TransitionMonolith and compatibility boundariesCompatibility and backfill
IntegrityConstraints and transaction participationData integrity and transactions
TestingSafe database-oriented testingDatabase testing guide
InventoryPersisted objects, relationships, indexesSchema reference

Transitional boundaries

Employee Service and the monolith currently have separate employee/organization persistence models and different identifier types. No Employee Service backfill runner or durable legacy-ID mapping table was found. Cutover ownership, reconciliation, and historical migration remain Requires confirmation.

Public-safety limitations

This documentation intentionally omits deployed database names, connection material, hosts, credentials, internal infrastructure identifiers, personal records, government-identifier examples, raw event bodies, and direct production-edit instructions.

Source References

  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
  • microservices/src/employee-service/Infrastructure/Persistence.cs
  • microservices/src/employee-service/Infrastructure/Migrations/
  • microservices/src/employee-service/Domain/Employees/Employee.cs
  • Data/AppDbContext.cs

See Also

Keywords

  • Employee persistence
  • EF Core
  • Tenant-scoped data

Revision Information

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