User setting for a language version group of courses.
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
course_language_group_id | uuid | false | public.course_language_groups public.courses | Group of courses that these settings are used for. | ||
created_at | timestamp with time zone | now() | false | Timestamp when the record was created. | ||
current_course_id | uuid | false | public.courses public.course_instance_enrollments | Current course language version that the user is on. Used as a constraint for valid course instance. | ||
current_course_instance_id | uuid | false | public.course_instances public.course_instance_enrollments | Current course instance that the user is on. | ||
deleted_at | timestamp with time zone | true | Timestamp when the record was deleted. If null, the record is not deleted. | |||
updated_at | timestamp with time zone | now() | false | Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger. | ||
user_id | uuid | false | public.users public.course_instance_enrollments | The user that these settings should be applied for. |
Name | Type | Definition |
---|---|---|
user_course_settings_course_language_group_id_fkey | FOREIGN KEY | FOREIGN KEY (course_language_group_id) REFERENCES course_language_groups(id) |
user_course_settings_current_course_id_course_language_gro_fkey | FOREIGN KEY | FOREIGN KEY (current_course_id, course_language_group_id) REFERENCES courses(id, course_language_group_id) |
user_course_settings_current_course_id_fkey | FOREIGN KEY | FOREIGN KEY (current_course_id) REFERENCES courses(id) |
user_course_settings_current_course_instance_id_fkey | FOREIGN KEY | FOREIGN KEY (current_course_instance_id) REFERENCES course_instances(id) |
user_course_settings_pkey | PRIMARY KEY | PRIMARY KEY (user_id, course_language_group_id) |
user_course_settings_user_id_current_course_id_current_cou_fkey | FOREIGN KEY | FOREIGN KEY (user_id, current_course_id, current_course_instance_id) REFERENCES course_instance_enrollments(user_id, course_id, course_instance_id) |
user_course_settings_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
Name | Definition |
---|---|
user_course_settings_pkey | CREATE UNIQUE INDEX user_course_settings_pkey ON public.user_course_settings USING btree (user_id, course_language_group_id) |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.user_course_settings FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls