Index

public.course_background_questions

Description

A teacher-defined extra question that gets asked from the students when they start a course. The question can be either for all students in a course or it can be only for the students that selected a specific course instance.

Columns

Name Type Default Nullable Children Parents Comment
course_id uuid false public.courses The course this question applies to. If course_instance_id is null, this question will be asked from all students regardless which course instance they selected.
course_instance_id uuid true public.course_instances If set, this question will be asked only from the students that selected this specific course instance.
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.
id uuid uuid_generate_v4() false public.course_background_question_answers A unique, stable identifier for the record.
question_text varchar(512) false
question_type course_background_question_type false
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.

Constraints

Name Type Definition
course_background_questions_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
course_background_questions_course_instance_id_fkey FOREIGN KEY FOREIGN KEY (course_instance_id) REFERENCES course_instances(id)
course_background_questions_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
course_background_questions_pkey CREATE UNIQUE INDEX course_background_questions_pkey ON public.course_background_questions USING btree (id)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.course_background_questions FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls