tbl_rolemasterhistory

-1 rows


Description

Module: HRMS Role Module
Purpose: Provides a complete, immutable audit trail for all changes to role definitions and configurations.
Data: One row is created for each significant modification to a role record in tbl_rolemaster.
Process Usage:
- Automatically populated by application logic when role properties are updated.
- Used by administrators and auditors to track the evolution of role permissions and settings over time.
Key Points:
- Maintains historical integrity of role changes for compliance and troubleshooting.
- Stores snapshots of role data at the time of each modification event.
Business Impact: Essential for security audits, change management, and understanding the historical context of permission changes.

Columns

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

Primary key
Format: Bigint (auto-increment)
Used as: Unique identifier for each historical role change record.

roleid int4 10 null
tbl_rolemaster.roleid Implied Constraint R

FK: public.tbl_rolemaster.roleid
Meaning: References the original role that was modified.
Dependency: Allows tracing all historical changes back to the active role definition.

rolename varchar 50 null

Type: Varchar
Meaning: The name of the role at the time this historical snapshot was taken.
Logic: Captures role name changes for complete audit trail.

roledescription varchar 500 null

Type: Varchar
Meaning: The description of the role at the time of modification.
Logic: Tracks changes to role purpose and responsibility definitions.

roledate timestamp 29,6 null

Type: Date
Meaning: The effective date of the role when this historical record was created.
Usage: Preserves temporal context of role configuration changes.

rolestatus bool 1 null

Type: Boolean
Meaning: The activation status of the role at the time of this snapshot.
Usage: Records when roles were enabled or disabled historically.

roletype int4 10 null

Type: Integer
Meaning: The role type/category value when this historical entry was saved.
Logic: Tracks changes to role hierarchy and classification.

companyid int4 10 null
tbl_companymaster.companyid Implied Constraint R

FK: public.tbl_company.companyid
Meaning: The company association of the role at the time of modification.
Dependency: Records role ownership changes across organizational units.

rolediff bool 1 null

Type: Boolean
Meaning: The differentiated permission flag value from the historical role state.
Usage: Audits changes to special permission characteristics over time.

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

Relationships