tbl_shiftmasterv1history

1 rows


Description

Module: HRMS Time & Attendance (Shift Audit Log)
Purpose: Provides a historical, immutable audit log of all modifications made to shift configurations in the public.tbl_shiftmasterv1 master table.
Data: Stores a complete snapshot of the shift record whenever any change occurs, ensuring compliance and trackability.
Process Usage:
- Automatically populated by system triggers or application logic on updates to the shift master table.
- Used for auditing, dispute resolution, and reviewing the exact shift configuration effective on any past date.
Key Points:
- Essential for legal compliance to prove which shift rules were active at a specific time.
- Every row is a unique version of a shift record.
Business Impact: Guarantees transparency and non-repudiation of all shift configuration changes.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
historyid bigserial 19 nextval('tbl_shiftmasterv1history_historyid_seq'::regclass)
tbl_employee_attendance_policy_history.historyid Implied Constraint R
tbl_taskcustomfieldsvaluehistory.historyid Implied Constraint R
tbl_taskhistory.historyid Implied Constraint R
tbl_templatecustomfieldvaluehistory.historyid Implied Constraint R

Primary key of the history table
Format: Integer (auto-increment)
Used as: Unique identifier for this single historical snapshot.

shiftid int8 19 null
tbl_shiftmasterv1.shiftid Implied Constraint R

FK: public.tbl_shiftmasterv1.shiftid
Meaning: The primary key of the parent shift record that this history entry belongs to.
Dependency: Links the historical record back to its active shift master record.

shiftname varchar 100 null

The user-friendly name of the shift at the time this history record was created.
Format: Varchar/Text.

shiftcolor varchar 50 null

The color code used for visual representation of the shift in this version.
Format: Varchar.

companyid int4 10 null
tbl_companymaster.companyid Implied Constraint R

FK: Reference to a company master table
Meaning: The company ID to which the shift applied in this historical version.

stage varchar 30 null

The lifecycle status of the shift configuration at the time of the change (e.g., Active).
Format: Varchar/Text.

nextdayend bool 1 null

Flag indicating if the shift end time extended into the next calendar day in this version.
Format: Boolean.

starttime time 15,6 null

The scheduled start time of the shift in this version.
Format: Time.

endtime time 15,6 null

The scheduled end time of the shift in this version.
Format: Time.

duration varchar 50 null

The total scheduled duration of the shift in this version.
Format: Time/Interval.

tolerancestart numeric 0 null

The allowed buffer or grace time before the shift start time in this version.
Format: Time/Interval.

toleranceend numeric 0 null

The allowed buffer or grace time after the shift end time in this version.
Format: Time/Interval.

buffertime int8 19 null

General buffer time or total non-working grace period allocated for the shift in this version.
Format: Time/Interval.

fulldayhours numeric 0 null

The minimum working hours required to qualify for a “Full Day” of attendance in this version.
Format: Time/Interval.

halfdayhours numeric 0 null

The minimum working hours required to qualify for a “Half Day” of attendance in this version.
Format: Time/Interval.

shiftgroup bool 1 false

FK: Reference to a shift group master table
Meaning: The shift group this configuration belonged to in this version.
Format: Varchar/Text.

description varchar 1000 null

Detailed description or notes about the shift in this version.
Format: Text.

createdby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The user who performed the action (modified the parent record) that created this history entry.

createddate timestamp 29,6 null

Timestamp of when the historical record was created (i.e., when the modification occurred).
Format: Timestamp with timezone.

modifiedby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The last user who modified the shift record before this history snapshot was taken (same as createdby if the change was immediate).

modifieddate timestamp 29,6 null

Timestamp of the last modification to the parent shift record before this history snapshot was taken.
Format: Timestamp with timezone.

Indexes

Constraint Name Type Sort Column(s)
tbl_shiftmasterv1history_pk__tbl_shif__4d7b4abdc1069333 Primary key Asc historyid

Relationships