Part of user a exercise state, keeps track of the state of a single exercise slide.
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_slide_id | uuid | false | public.exercise_slides | Exercise slide that this state is tracking per exercise state. | ||
grading_progress | grading_progress | false | Tells how grading of this exercise slide is progressing towards completion. | |||
id | uuid | uuid_generate_v4() | false | public.user_exercise_task_states | ||
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_state_id | uuid | false | public.user_exercise_states | User exercise state related to this user slide state. |
Name | Type | Definition |
---|---|---|
user_exercise_slide_state_uniqueness | UNIQUE | UNIQUE NULLS NOT DISTINCT (user_exercise_state_id, exercise_slide_id, deleted_at) |
user_exercise_slide_states_exercise_slide_id_fkey | FOREIGN KEY | FOREIGN KEY (exercise_slide_id) REFERENCES exercise_slides(id) |
user_exercise_slide_states_pkey | PRIMARY KEY | PRIMARY KEY (id) |
user_exercise_slide_states_user_exercise_state_id_fkey | FOREIGN KEY | FOREIGN KEY (user_exercise_state_id) REFERENCES user_exercise_states(id) |
Name | Definition |
---|---|
user_exercise_slide_state_uniqueness | CREATE UNIQUE INDEX user_exercise_slide_state_uniqueness ON public.user_exercise_slide_states USING btree (user_exercise_state_id, exercise_slide_id, deleted_at) NULLS NOT DISTINCT |
user_exercise_slide_states_pkey | CREATE UNIQUE INDEX user_exercise_slide_states_pkey ON public.user_exercise_slide_states USING btree (id) |
user_exercise_slide_states_user_exercise_state_id_idx | CREATE INDEX user_exercise_slide_states_user_exercise_state_id_idx ON public.user_exercise_slide_states USING btree (user_exercise_state_id) |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.user_exercise_slide_states FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls