tbl_okr_template_assign_history

-1 rows


Description

Module: Objectives and Key results (OKR)
Purpose: Stores an immutable, time-stamped audit log of the assignment process and configuration of a specific OKR cycle for an employee.
Data: Captures the full snapshot of the assignment header (template name, dates, weightage) and the exact template fields used at that point in time.
Process Usage:
- A new record is created when the assignment is finalized, updated, or when a major status change occurs.
- Used for auditing and determining the exact set of goals that were active during a specific period.
Key Points:
- Immutable Log: Guarantees a record of the assignment configuration and dates.
- Template Fields: Stores the full JSON of the assigned goals to preserve the exact structure of the template at the time of assignment.

Columns

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

Primary key
Format: Long (auto-increment)
Used as: Unique identifier for a single historical snapshot of the assignment.

template_assign_id int8 19 null

FK: public.tbl_okr_template_assign.id
Meaning: The ID of the parent master assignment record this history entry relates to.

template_name varchar 200 null

The name of the OKR template in this historical snapshot.

review_frequency varchar 20 null

The review frequency configured in this historical snapshot.

period_type varchar 20 null

The duration type of the OKR cycle in this historical snapshot.

start_date date 13 null

The start date of the performance cycle in this historical snapshot.

end_date date 13 null

The end date of the performance cycle in this historical snapshot.

assignee varchar 50 null

FK: public.tbl_employee.employeeid
Meaning: The Employee ID to whom this historical assignment applies.

total_tasks int4 10 null

The total count of goals included in this historical snapshot.

total_weightage float8 17,17 null

The sum of the weightage of all goals in this historical snapshot.

template_fields text 2147483647 null

JSON data string containing the detailed configuration of all Objectives, Key Results, and Questions that were part of the template at this point in history.

is_delete bool 1 null

Soft-delete flag: Indicates if the parent assignment was logically deleted or cancelled in this history snapshot.

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

Indexes

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

Relationships