Skip to main content

Leave Database

Summary

This section documents the current Leave Service EF Core persistence model without publishing deployment details, payload bodies, or personal records.

Audience

Backend developers, QA engineers, architects, DevOps engineers, support engineers, and future schema-reference automation owners.

Overview

Scope and ownership

Leave Service uses PostgreSQL through EF Core code-first persistence and owns a Leave-bounded schema model. Its single DbContext contains 12 business, projection, history, foundation, and operational objects. Employee master data, Attendance decisions, Payroll processing, and Workflow state remain outside this database boundary.

Data, tenant, and migration model

Eleven objects carry tenant identifiers and global query filters; the operational outbox has no global tenant filter. Three migrations build the current model, and development-only seed logic can initialize synthetic local data. Monolith persistence remains a separate Transitional compatibility source; shared tables or automatic data synchronization are not assumed.

Documentation map

Related scopes: Business, Technical, API, and the future Events section. Detailed HTTP contracts and event payloads are intentionally outside this epic.

Public-safety limitations

This section omits connection details, deployed database names, secret-bearing settings, personal data, infrastructure identifiers, payload bodies, destructive SQL, and production data-edit procedures.

Source References

  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • microservices/src/leave-service/Infrastructure/Persistence.cs
  • microservices/src/leave-service/Infrastructure/Migrations/LeaveDbContextModelSnapshot.cs

See Also

Keywords

  • Leave persistence
  • EF Core
  • PostgreSQL

Revision Information

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