tbl_okr_key_results_history

-1 rows


Description

Module: Objectives and Key results (OKR)
Purpose: Stores an immutable, historical snapshot of a Key Result (KR) whenever its status, definition, or progress metrics are updated in the main tbl_okr_key_results table.
Data: Records all KR definition details, target values, ownership, and, most importantly, the progress metrics (latest check-in value, date, percentage) at the time of the change event.
Process Usage:
- A new record is created automatically upon every KR check-in or when the KR’s structural properties are modified.
- Used for auditing goal changes, tracking progress trends over time, and resolving disputes regarding check-in values.
Key Points:
- Immutable Log: Guarantees a time-stamped history of every KR state.
- Snapshot: Mirrors all fields from the live KR table to preserve context for the audit event.
Business Impact: Provides a transparent and verifiable record of goal achievement progress throughout the OKR cycle.

Columns

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

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

key_result_id int8 19 null

FK: public.tbl_okr_key_results.id
Meaning: The ID of the original live Key Result record that this history entry belongs to.

key_result_name varchar 200 null

The name/description of the KR at the time of the event.

objective_id int8 19 null

FK: public.tbl_okr_objective.id
Meaning: The parent Objective this snapshot is linked to.

department_id int8 19 null

FK: public.tbl_department.id
Meaning: The department responsible for the KR at this snapshot time.

period_type varchar 20 null

The duration type for the KR at the time of the event.

start_date date 13 null

The start date for the KR period.

end_date date 13 null

The end date for the KR period.

description varchar 1000 null

Detailed description or context for the KR at the time of the event.

measurement_type varchar 20 null

The method used to track progress at the time of the event.

measurement_unit varchar 50 null

The unit of measure for the KR at the time of the event.

current_value numeric 0 null

The starting baseline value for the KR at the time of the event.

target_value numeric 0 null

The final target value set for this KR at the time of the event.

past_check_in_limit int4 10 null

The past check-in limit configured for the KR at the time of the event.

key_result_owners text 2147483647 null

JSON array of Employee IDs who were accountable for this KR at the time of the event.

weightage float8 17,17 null

The weighted contribution of this KR at the time of the event.

latest_check_in_by varchar 50 null

The Employee ID of the person who submitted the last progress update that triggered this history record.

latest_check_in_value numeric 0 null

The quantitative value reported in the update that triggered this history record.

latest_check_in_date timestamp 29,6 null

The timestamp of the progress update that triggered this history record.

latest_check_in_percentage float8 17,17 null

The calculated achievement percentage after the update was applied.

latest_check_in_weighted_percentage float8 17,17 null

The calculated weighted percentage after the update was applied.

latest_status varchar 20 null

The KR’s health status (e.g., ON_TRACK) after the update was applied.

is_individual bool 1 null

Boolean flag: Indicates if this was an individual KR at the time of the event.

template_field_id int8 19 null

FK: public.tbl_okr_template_fields_assign.id
Meaning: The ID of the template field from which this KR was originally assigned.

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_key_results_history Primary key Asc id

Relationships