lesson_progress table
The lesson_progress table in the Learning Management System Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to enrollments and lessons.
Per enrolment, not per user. Re-taking the course in a new cohort starts a clean trail. last_position_seconds is what resumes the video.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| enrollment_id | uuid | not null, references enrollments.id | |
| lesson_id | uuid | not null, references lessons.id | |
| status | progress_status | not null | |
| seconds_watched | integer | not null | |
| last_position_seconds | integer | ||
| first_viewed_at | timestamptz | ||
| completed_at | timestamptz |
Indexes (2)
(enrollment_id, lesson_id)unique(enrollment_id, status)
Relationships
lesson_progress.enrollment_idreferencesenrollments.idlesson_progress.lesson_idreferenceslessons.id