Stores information about students answers to questions in consent forms
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
course_id | uuid | false | public.courses | The course for which the research consent form belongs to | ||
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 | |||
research_consent | boolean | false | false | Whether or not the student has agreed to the question | ||
research_form_question_id | uuid | false | public.course_specific_consent_form_questions | The consent question for which the answer belongs to | ||
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 for which the consent belongs to |
Name | Type | Definition |
---|---|---|
course_specific_consent_form_ans_research_form_question_id_fkey | FOREIGN KEY | FOREIGN KEY (research_form_question_id) REFERENCES course_specific_consent_form_questions(id) |
course_specific_consent_form_answer_user_uniqueness | UNIQUE | UNIQUE NULLS NOT DISTINCT (user_id, research_form_question_id) |
course_specific_consent_form_answers_course_id_fkey | FOREIGN KEY | FOREIGN KEY (course_id) REFERENCES courses(id) |
course_specific_consent_form_answers_pkey | PRIMARY KEY | PRIMARY KEY (id) |
course_specific_consent_form_answers_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
Name | Definition |
---|---|
course_specific_consent_form_answer_user_uniqueness | CREATE UNIQUE INDEX course_specific_consent_form_answer_user_uniqueness ON public.course_specific_consent_form_answers USING btree (user_id, research_form_question_id) NULLS NOT DISTINCT |
course_specific_consent_form_answers_pkey | CREATE UNIQUE INDEX course_specific_consent_form_answers_pkey ON public.course_specific_consent_form_answers USING btree (id) |
course_specific_consent_form_answers_user_id_idx | CREATE INDEX course_specific_consent_form_answers_user_id_idx ON public.course_specific_consent_form_answers USING btree (user_id) |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.course_specific_consent_form_answers FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls