users table

The users table in the Learning Management System Database Schema schema has 9 columns, keyed by id, with 1 foreign key to user_profiles. 11 columns in user_roles, course_instructors, cohort_members, enrollments and 7 more reference it.

One row per person regardless of role. A user can be a student in one course and an instructor in another.

Columns (9)

Columns of the users table
ColumnTypeConstraintsDescription
iduuidprimary key, references user_profiles.user_id
emailvarchar(255)unique, not null
usernamevarchar(60)unique
full_namevarchar(120)not null
timezonevarchar(60)not null
localevarchar(10)
is_activebooleannot null
created_attimestamptznot null
last_login_attimestamptz

Indexes (1)

  • (is_active, created_at)

Relationships