Index

public.peer_or_self_review_question_submissions

Description

Submission for an individual question of a peer review.

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.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
number_data real true Number data of the answer depending on question type.
peer_or_self_review_question_id uuid false public.peer_or_self_review_questions Peer review question that is being answered.
peer_or_self_review_submission_id uuid false public.peer_or_self_review_submissions Peer review submission that this question is a part of.
text_data varchar(65536) true Text data of the answer depending on question type.
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
peer_review_question_submissions_peer_review_question_id_fkey FOREIGN KEY FOREIGN KEY (peer_or_self_review_question_id) REFERENCES peer_or_self_review_questions(id)
peer_review_question_submissions_peer_review_submission_id_fkey FOREIGN KEY FOREIGN KEY (peer_or_self_review_submission_id) REFERENCES peer_or_self_review_submissions(id)
peer_review_question_submissions_pkey PRIMARY KEY PRIMARY KEY (id)
text_or_number_data_set CHECK CHECK (((text_data IS NULL) <> (number_data IS NULL)))

Indexes

Name Definition
peer_review_question_submissions_pkey CREATE UNIQUE INDEX peer_review_question_submissions_pkey ON public.peer_or_self_review_question_submissions USING btree (id)

Triggers

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

Relations

er

Generated by tbls