tbl_userrolehistory

-1 rows


Description

Module: HRMS Role Master
Purpose: Provides a complete, immutable audit trail for all changes to user role permissions and page-level access rights.
Data: One row is created for each significant modification to permission records in tbl_userrole.
Process Usage:
- Automatically populated by application logic when role permissions are updated.
- Used by administrators and auditors to track permission changes and access right evolution.
Key Points:
- Maintains historical integrity of permission matrix changes for compliance.
- Stores snapshots of page-level permissions at the time of each modification.
Business Impact: Essential for security audits, compliance reporting, and investigating permission-related issues.

Columns

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

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

userrolegid int8 19 null
tbl_userrole.userrolegid Implied Constraint R

FK: public.tbl_userrole.userrolegid
Meaning: References the original permission record that was modified.
Dependency: Allows tracing all historical changes back to the active permission definition.

rolehistoryid int4 10 null

FK: public.tbl_rolemasterhistory.rolehistoryid
Meaning: Links to the historical role snapshot when this permission change occurred.
Dependency: Maintains relationship consistency between role and permission history.

rgpagename varchar 100 null

Type: Varchar
Meaning: The page name permission setting at the time this historical snapshot was taken.
Logic: Captures changes to page name assignments in permissions.

rgmenuname varchar 100 null

Type: Varchar
Meaning: The menu name permission setting when this historical record was created.
Logic: Tracks changes to menu categorization in permission structures.

rgpageurl varchar 100 null

Type: Varchar
Meaning: The page URL access path at the time of modification.
Usage: Records historical URL mappings for permission validation.

pagesave bool 1 null

Type: Boolean
Meaning: The save/create permission flag value from the historical permission state.
Usage: Audits changes to create operation permissions over time.

pageedit bool 1 null

Type: Boolean
Meaning: The edit/update permission flag value from the historical permission state.
Usage: Audits changes to update operation permissions over time.

pagedelete bool 1 null

Type: Boolean
Meaning: The delete permission flag value from the historical permission state.
Usage: Audits changes to delete operation permissions over time.

pageview bool 1 null

Type: Boolean
Meaning: The view/read permission flag value from the historical permission state.
Usage: Audits changes to read operation permissions over time.

rolegid int8 19 null

Type: Bigint
Meaning: The role grouping identifier from the historical permission configuration.
Logic: Preserves role hierarchy context for permission changes.

parentid int8 19 null

Type: Bigint
Meaning: The parent permission reference from the historical permission structure.
Usage: Maintains hierarchical relationship context in permission history.

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

Relationships