Index

public.exam_enrollments

Description

Stores which users are enrolled in which exams and related data.

Columns

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.
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.

Constraints

Name Type Definition
exam_enrollments_exam_id_fkey FOREIGN KEY FOREIGN KEY (exam_id) REFERENCES exams(id)
exam_enrollments_pkey PRIMARY KEY PRIMARY KEY (user_id, exam_id)
exam_enrollments_user_id_fkey FOREIGN KEY FOREIGN KEY (user_id) REFERENCES users(id)

Indexes

Name Definition
exam_enrollments_pkey CREATE UNIQUE INDEX exam_enrollments_pkey ON public.exam_enrollments USING btree (user_id, exam_id)

Relations

er

Generated by tbls