Stores which users are enrolled in which exams and related data.
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| created_at | timestamp with time zone | now() | false | Timestamp when the record was created. | ||
| deleted_at | timestamp with time zone | true | Timestamp when the record was deleted. If null, the record is not deleted. | |||
| ended_at | timestamp with time zone | true | Timestamp when the exam has ended. If null, the exam time has not ended. | |||
| exam_id | uuid | false | public.exams | The exam the user has enrolled in. | ||
| is_teacher_testing | boolean | false | false | Is the exam enrollment used for teacher previewing the exam | ||
| show_exercise_answers | boolean | false | false | Used when teacher is testing exam to show the answers if true | ||
| started_at | timestamp with time zone | now() | false | The moment the user started the exam. | ||
| 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 | The user that has enrolled in the exam. |
| Name | Type | Definition |
|---|---|---|
| exam_enrollments_created_at_not_null | n | NOT NULL created_at |
| exam_enrollments_exam_id_fkey | FOREIGN KEY | FOREIGN KEY (exam_id) REFERENCES exams(id) |
| exam_enrollments_exam_id_not_null | n | NOT NULL exam_id |
| exam_enrollments_is_teacher_testing_not_null | n | NOT NULL is_teacher_testing |
| exam_enrollments_pkey | PRIMARY KEY | PRIMARY KEY (user_id, exam_id) |
| exam_enrollments_show_exercise_answers_not_null | n | NOT NULL show_exercise_answers |
| exam_enrollments_started_at_not_null | n | NOT NULL started_at |
| exam_enrollments_updated_at_not_null | n | NOT NULL updated_at |
| exam_enrollments_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
| exam_enrollments_user_id_not_null | n | NOT NULL user_id |
| Name | Definition |
|---|---|
| exam_enrollments_pkey | CREATE UNIQUE INDEX exam_enrollments_pkey ON public.exam_enrollments USING btree (user_id, exam_id) |
Generated by tbls