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)

Columns of the lesson_progress table
ColumnTypeConstraintsDescription
iduuidprimary key
enrollment_iduuidnot null, references enrollments.id
lesson_iduuidnot null, references lessons.id
statusprogress_statusnot null
seconds_watchedintegernot null
last_position_secondsinteger
first_viewed_attimestamptz
completed_attimestamptz

Indexes (2)

  • (enrollment_id, lesson_id) unique
  • (enrollment_id, status)

Relationships