Skip to content

Courses Schema

Schema: ext_courses | Auto-generated on 2026-03-30


Course catalog with pricing, levels, and enrollment tracking.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
instructor_iduuidNO
titletextNO
slugtextNO
descriptiontextYES
short_descriptiontextYES
thumbnail_urltextYES
promo_video_urltextYES
pricenumericNO0
typetextNO'course'
leveltextNO'all'
statustextNO'draft'
is_freebooleanNOfalse
duration_minutesintegerNO0
capacityintegerYES
enrollment_countintegerNO0
rating_avgnumericNO0
rating_countintegerNO0
metadatajsonbNO'{}'
published_attimestamptzYES
created_attimestamptzNOnow()
updated_attimestamptzNOnow()

Course chapter/section groupings.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
titletextNO
descriptiontextYES
sort_orderintegerNO0
created_attimestamptzNOnow()
updated_attimestamptzNOnow()

Polymorphic items within chapters (lessons, quizzes, assignments).

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
chapter_iduuidNO
item_typetextNO
item_iduuidNO
titletextNO
sort_orderintegerNO0
is_free_previewbooleanNOfalse
created_attimestamptzNOnow()

Individual course lessons.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
titletextNO
contenttextYES
video_urltextYES
video_providertextYES
video_durationintegerYES
typetextNO'video'
statustextNO'draft'
created_attimestamptzNOnow()
updated_attimestamptzNOnow()

Files attached to lessons.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
lesson_iduuidNO
titletextNO
file_pathtextNO
file_sizeintegerYES
file_typetextYES
created_attimestamptzNOnow()

Student course enrollments with progress tracking.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
user_iduuidNO
payment_iduuidYES
statustextNO'active'
progress_percentintegerNO0
completed_itemsintegerNO0
total_itemsintegerNO0
enrolled_attimestamptzNOnow()
completed_attimestamptzYES
created_attimestamptzNOnow()
updated_attimestamptzNOnow()

Per-item completion tracking within an enrollment.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
enrollment_iduuidNO
user_iduuidNO
item_typetextNO
item_iduuidNO
completedbooleanNOfalse
completed_attimestamptzYES
created_attimestamptzNOnow()

Daily learning time per enrollment.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
enrollment_iduuidNO
user_iduuidNO
datedateNOCURRENT_DATE
seconds_spentintegerNO0
created_attimestamptzNOnow()
updated_attimestamptzNOnow()

Downloadable course files.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
titletextNO
descriptiontextYES
file_pathtextNO
file_sizeintegerYES
file_typetextYES
accessibilitytextNO'enrolled'
sort_orderintegerNO0
created_attimestamptzNOnow()

Course FAQ entries.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
questiontextNO
answertextNO
sort_orderintegerNO0
created_attimestamptzNOnow()
updated_attimestamptzNOnow()

Course prerequisite requirements.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
required_course_iduuidNO
created_attimestamptzNOnow()

Student notes on lessons within a course.

ColumnTypeNullableDefault
iduuidNOgen_random_uuid()
course_iduuidNO
user_iduuidNO
lesson_iduuidYES
contenttextNO
created_attimestamptzNOnow()
updated_attimestamptzNOnow()