Index

public.exercise_task_regrading_submissions

Description

Join table that tells which submissions belong in one regrading operation.

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.
exercise_task_submission_id uuid false public.exercise_task_submissions The submission that is regraded in the regrading operation specified in regrading_id.
grading_after_regrading uuid true public.exercise_task_gradings The grading object that was created in this grading operation.
grading_before_regrading uuid false public.exercise_task_gradings The grading object that was set to submission.grading_id before the regrading operation started i.e. the grading where the submission got its points before the regrading operation started.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
regrading_id uuid false public.regradings The regrading operation to which the submission is attached 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.

Constraints

Name Type Definition
regrading_submissions_grading_after_regrading_fkey FOREIGN KEY FOREIGN KEY (grading_after_regrading) REFERENCES exercise_task_gradings(id)
regrading_submissions_grading_before_regrading_fkey FOREIGN KEY FOREIGN KEY (grading_before_regrading) REFERENCES exercise_task_gradings(id)
regrading_submissions_pkey PRIMARY KEY PRIMARY KEY (id)
regrading_submissions_regrading_id_fkey FOREIGN KEY FOREIGN KEY (regrading_id) REFERENCES regradings(id)
regrading_submissions_submission_id_fkey FOREIGN KEY FOREIGN KEY (exercise_task_submission_id) REFERENCES exercise_task_submissions(id)

Indexes

Name Definition
regrading_submissions_pkey CREATE UNIQUE INDEX regrading_submissions_pkey ON public.exercise_task_regrading_submissions USING btree (id)

Triggers

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

Relations

er

Generated by tbls