Skip to main content

Attendance Database

Summary

This section documents the current Attendance Service persistence model without publishing deployment details or customer data.

Audience

  • Backend developers, QA engineers, solution architects, DevOps engineers, and support engineers

Overview

Scope

Attendance Service uses PostgreSQL through EF Core code-first persistence and owns an attendance schema model. The model contains Attendance core data, Time Office configuration, an Attendance-local employee projection, payroll-approved snapshots, audit and timeline history, and an operational outbox.

Persistence ownership

Attendance Service owns its context and migrations. Employee master data remains outside this boundary; EmployeeProfiles is a local read model. Payroll consumes approved Attendance information while the snapshot is stored by Attendance. Legacy monolith stores remain a Transitional compatibility source and are not assumed to share tables.

Tenant and migration model

Most business and history objects carry a tenant identifier and have global query filters. The outbox is an operational store without that filter. Three migrations build the current model; startup migration can be suppressed by an environment-controlled operational setting. Development seeding is development-only.

Documentation map

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

Public-safety limitations

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

Source References

  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs
  • microservices/src/attendance-service/Infrastructure/Persistence.cs
  • microservices/src/attendance-service/Infrastructure/Migrations/AttendanceDbContextModelSnapshot.cs

See Also

Keywords

  • Attendance persistence
  • EF Core
  • PostgreSQL

Revision Information

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