Index

public.user_exercise_task_states

Description

Part of user a exercise state, keeps track of the state of a single exercise task.

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_id uuid false public.exercise_tasks Exercise task that this task is tracking per exercise slide state.
grading_progress grading_progress false Tells how grading of this exercise task is progressing towards completion.
score_given real true If not null, it indicates how many points the student has gotten from this exercise slide.
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_exercise_slide_state_id uuid false public.user_exercise_slide_states User exercise slide state related to this task state.

Constraints

Name Type Definition
user_exercise_task_states_exercise_task_id_fkey FOREIGN KEY FOREIGN KEY (exercise_task_id) REFERENCES exercise_tasks(id)
user_exercise_task_states_pkey PRIMARY KEY PRIMARY KEY (user_exercise_slide_state_id, exercise_task_id)
user_exercise_task_states_user_exercise_slide_state_id_fkey FOREIGN KEY FOREIGN KEY (user_exercise_slide_state_id) REFERENCES user_exercise_slide_states(id)

Indexes

Name Definition
user_exercise_task_states_pkey CREATE UNIQUE INDEX user_exercise_task_states_pkey ON public.user_exercise_task_states USING btree (user_exercise_slide_state_id, exercise_task_id)

Triggers

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

Relations

er

Generated by tbls