Stores the answer that was offered to a user to be peer reviewed. Used to make sure the user is likely to get the same answer to review if they reload their browser. All entries are cleaned from here after 1 hour. Also, the user will be given a different answer to review if the answer stored here no longer needs peer review.
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
course_instance_id | uuid | false | public.course_instances | The course instance the user was on. | ||
created_at | timestamp with time zone | now() | false | Timestamp when the record was created. | ||
exercise_id | uuid | false | public.exercises | The exercise the peer review is related to. | ||
exercise_slide_submission_id | uuid | false | public.exercise_slide_submissions | The answer given to be peer reviewed | ||
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 the answer was given to be reviewed. |
Name | Type | Definition |
---|---|---|
offered_answers_to_peer_revie_exercise_slide_submission_id_fkey | FOREIGN KEY | FOREIGN KEY (exercise_slide_submission_id) REFERENCES exercise_slide_submissions(id) |
offered_answers_to_peer_review_temporar_course_instance_id_fkey | FOREIGN KEY | FOREIGN KEY (course_instance_id) REFERENCES course_instances(id) |
offered_answers_to_peer_review_temporary_exercise_id_fkey | FOREIGN KEY | FOREIGN KEY (exercise_id) REFERENCES exercises(id) |
offered_answers_to_peer_review_temporary_pkey | PRIMARY KEY | PRIMARY KEY (exercise_slide_submission_id, user_id, course_instance_id) |
offered_answers_to_peer_review_temporary_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
Name | Definition |
---|---|
offered_answers_to_peer_revie_created_at_exercise_id_course_idx | CREATE INDEX offered_answers_to_peer_revie_created_at_exercise_id_course_idx ON public.offered_answers_to_peer_review_temporary USING btree (created_at, exercise_id, course_instance_id, user_id) |
offered_answers_to_peer_review_temporary_pkey | CREATE UNIQUE INDEX offered_answers_to_peer_review_temporary_pkey ON public.offered_answers_to_peer_review_temporary USING btree (exercise_slide_submission_id, user_id, course_instance_id) |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.offered_answers_to_peer_review_temporary FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls