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.
| Entity | Indexed or constrained fields | Uniqueness |
|---|---|---|
| Canonical Shift | Compatibility identity | Unique |
| Canonical Shift | Tenant and active state | Non-unique |
| Canonical WeeklyOffRule | Tenant and weekday | Unique |
| AttendancePolicy | Tenant and active state | Non-unique |
| AttendancePolicy | Tenant where default state is true | Unique filtered |
| AttendancePolicyRule | Parent policy and rule key | Unique |
| EmployeeShiftAssignment | Tenant, employee, effective start | Non-unique |
| EmployeeShiftAssignment | Tenant and shift reference | Non-unique |
| Configuration audit | Tenant and occurrence time | Non-unique |
| Configuration timeline | Tenant and occurrence time | Non-unique |
| Leave Holiday | Tenant and date | Non-unique |
| Leave WeeklyOff | Tenant and day | Non-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.csmicroservices/src/leave-service/Infrastructure/LeaveDbContext.csData/AppDbContext.cs
Related Articles
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