Skip to main content

Indexes and Constraints

Audience

Developers, database engineers, QA engineers, support engineers, security engineers, solution architects, and implementation partners.

Reference Content

This page records source-verified Workforce Scheduling persistence behavior and boundaries.

Summary

The following logical indexes and constraints are verified. Physical index and storage identifiers are intentionally omitted.

EntityIndexed or constrained fieldsUniqueness
Canonical ShiftCompatibility identityUnique
Canonical ShiftTenant and active stateNon-unique
Canonical WeeklyOffRuleTenant and weekdayUnique
AttendancePolicyTenant and active stateNon-unique
AttendancePolicyTenant where default state is trueUnique filtered
AttendancePolicyRuleParent policy and rule keyUnique
EmployeeShiftAssignmentTenant, employee, effective startNon-unique
EmployeeShiftAssignmentTenant and shift referenceNon-unique
Configuration auditTenant and occurrence timeNon-unique
Configuration timelineTenant and occurrence timeNon-unique
Leave HolidayTenant and dateNon-unique
Leave WeeklyOffTenant and dayNon-unique

Missing constraints

Canonical active shift name is not database-unique. Assignment overlaps are not excluded. Assignment scalar references are not foreign keys. Leave calendar indexes are not unique. Explicit legacy shift/calendar indexes were not found.

Check constraints

No scheduling-specific database check constraints were verified; range and domain checks are implemented in application/domain code.

Source References

  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs
  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • Data/AppDbContext.cs

See Also

Keywords

  • Workforce Scheduling database
  • Shift persistence
  • Attendance policy storage

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Next review: 2026-10-20