Payroll Database Documentation
Summary
Payroll Service uses one EF Core context with 19 persisted object sets, 19 primary keys, 23 explicit secondary indexes, and four migrations. The model is Transitional and contains no configured foreign keys or concurrency tokens.
Audience
Payroll developers, QA and support engineers, solution and security architects, data reviewers, and implementation partners.
Overview
This page summarizes the verified Payroll persistence foundation and links its detailed evidence.
Purpose
Provide the public-safe, source-backed database reference for Payroll ownership, objects, projections, isolation, migration, compatibility, integrity, and test boundaries.
Documentation map
- Payroll Database Overview
- Payroll Database Ownership and Boundaries
- Payroll Run Storage
- Payroll Period Storage
- Payroll Workforce Storage
- Salary Component Storage
- Payroll Detail Storage
- Attendance Projection Storage
- Leave Projection Storage
- Expense Projection Storage
- Advance and Recovery Storage
- Payslip Storage
- Audit and Timeline Storage
- Payroll Outbox Storage
- Payroll Tenant Isolation
- Payroll Migrations and Seeding
- Payroll Indexing and Query Patterns
- Payroll Compatibility and Transition Storage
- Payroll Data Integrity and Transactions
- Payroll Persistence Object Reference
- Payroll Database Testing Guide
Confirmed inventory
- DbContext: PayrollDbContext (one).
- DbSets / persisted objects: 19.
- Primary keys: 19.
- Explicit secondary indexes: 23 (10 unique, 13 non-unique).
- Global-filtered object types: 17.
- Foreign keys, owned types, persisted value objects, delete behaviors, and concurrency tokens: none configured.
- Migrations: four, plus the current model snapshot.
Persistence architecture
The context contains Payroll aggregates, employee-period inputs, local upstream projections, audit/timeline evidence, inbound processed-event markers, and outbound outbox intent. Logical record identifiers are application-managed because the model has no EF relationships.
Public-safety boundary
This section intentionally excludes physical schemas, SQL, connection details, infrastructure, configuration values, seed values, employee data, payment details, and payroll values.
Requires confirmation
Production migration and retention governance, database-level tenant controls, referential-integrity roadmap, concurrency strategy, and deployed outbox relay ownership require confirmation.
Source References
microservices/src/payroll-service/Infrastructure/PayrollDbContext.csmicroservices/src/payroll-service/Domain/PayrollEntities.csmicroservices/src/payroll-service/Infrastructure/Migrations/PayrollDbContextModelSnapshot.csmicroservices/src/payroll-service/Program.cs
Related Articles
See Also
Keywords
- Payroll database
- Payroll persistence
- PayrollDbContext
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly