tbl_course_history

-1 rows


Description

Module: Learning Management
Purpose: Maintains version history for course records stored in tbl_course.
Data: Each entry represents a snapshot of a course’s state whenever modifications occur in the main course table.
Process Usage:
- Tracks changes in title, category, deadline, and other course metadata.
- Enables audit trail and rollback capability for compliance and administrative purposes.
Key Points:
- Linked to main table by course_id.
- Used for historical reference, analytics, and change audits.
Business Impact: Supports accountability and traceability in course management workflows.

Columns

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

Primary key
Format: BIGSERIAL (auto-increment)
Meaning: Unique identifier for each course history record.

course_id int8 19 null

Course ID
Format: BIGINT
FK: public.tbl_course.course_id
Meaning: References the course for which this historical record was created.

title varchar 200 null

Course Title
Format: VARCHAR(200)
Meaning: Name of the course at the time of this historical snapshot.

description text 2147483647 null

Course Description
Format: TEXT
Meaning: Description text of the course in this version.

createdby varchar 50 null
createddate timestamp 29,6 null
modifiedby varchar 50 null
modifieddate timestamp 29,6 null
is_active bool 1 null

Active Flag
Format: BOOLEAN
Meaning: Whether the course was active in this version.

is_mandatory bool 1 null

Mandatory Flag
Format: BOOLEAN
Meaning: Indicates if the course was mandatory by default at this version.

category varchar 100 null

Course Category
Format: VARCHAR(100)
Meaning: Category label assigned to the course.

course_type varchar 50 null

Course Type
Format: VARCHAR(50)
Meaning: Reserved field; not currently used in logic.

tags varchar 500 null

Tags
Format: VARCHAR(500)
Meaning: Comma-separated keywords linked to this version of the course.

deadline int8 19 null

Default Deadline (Hours)
Format: BIGINT
Meaning: Default number of hours allowed for course completion in this version.

thumbnail text 2147483647 null

Thumbnail
Format: TEXT
Meaning: S3 path or URL for the course image at this version.

duration int8 19 null

Duration (Minutes)
Format: BIGINT
Meaning: Total duration of the course (in minutes) in this version.

applicable_criteria text 2147483647 null

Applicable Criteria (Assignment JSON)
Format: TEXT (JSON)
Meaning: JSON defining eligibility for course assignment in this version.

search_applicable_criteria text 2147483647 null

Search Applicable Criteria (Library JSON)
Format: TEXT (JSON)
Meaning: JSON defining visibility/self-enrollment criteria in this version.

Indexes

Constraint Name Type Sort Column(s)
tbl_course_history_pkey Primary key Asc history_id

Relationships