tbl_salarystructuretemplatehistory

-1 rows


Description

Module: Payroll/Compensation Management - Salary Structure Template History Log
Purpose: Stores an immutable, historical record of every change made to a master Salary Structure Template (from a related tbl_SalaryStructureTemplate table).
Data: Captures the unique ID of the original template, its status at the time of the change, and a complete JSON snapshot (HistoryObject) of the template’s details, including all associated pay elements and rules.
Process Usage:
- Auditing: Provides a complete audit trail of how salary structure rules have evolved over time for compliance and retrospective analysis.
- Rollback/Reference: Allows HR/Payroll to view the exact composition of a salary structure template as it existed on a past date.
- Compliance: Crucial for demonstrating adherence to compensation policies during audits.
Key Points:
- Snapshot Storage: The entire object of the template is serialized into the HistoryObject JSON column.
- Linked to the active template table via SalaryStructureTemplateId.
Business Impact: Ensures data integrity and accountability for all changes to employee compensation frameworks, which is critical for accurate payroll processing.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('tbl_salarystructuretemplatehistory_id_seq'::regclass)

Primary key
Format: Long (auto-increment)
Used as: Unique identifier for this specific historical snapshot.

salarystructuretemplateid int8 19 null

FK: public.tbl_SalaryStructureTemplate.Id (Implied)
Meaning: The ID of the master salary structure template that this history record relates to.

status varchar 50 null

The status of the salary structure template at the time this history entry was created (e.g., DRAFT, ACTIVE, INACTIVE).

historyobject varchar 2147483647 null

A complete JSON serialization of the SalaryStructureTemplateDTO object. This snapshot includes all details of the template (e.g., name, effective date, all linked pay elements and formulas).

createddate timestamp 29,6 null
createdby varchar 500 null
modifieddate timestamp 29,6 null
modifiedby varchar 500 null

Indexes

Constraint Name Type Sort Column(s)
tbl_salarystructuretemplatehistory_pk_tbl_salarystructuretempla Primary key Asc id

Relationships