Index

public.repository_exercises

Description

An exercise that corresponds to an exercise in a git repository.

Columns

Name Type Default Nullable Children Parents Comment
archive_path text false File store path of the exercise’s archive. Each version gets a new path. Copies of a course share their source’s archives.
checksum bytea false A checksum calculated from the exercise directory, used to detect updates to the exercise.
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.
details jsonb true What the exercise service that prepared the repository reported about the exercise, such as its language. Opaque to the host, which passes it back to exercise services with the exercise. NULL until the next sync after the column was added.
download_url text false The URL of the archive at archive_path.
id uuid uuid_generate_v4() false public.exercise_tasks A unique, stable identifier for the record.
name varchar(255) false The name of the exercise, such as “01_hello_world”.
part varchar(255) false Exercises are separated into parts, such as “part01”.
repository_id uuid false public.exercise_repositories Each repository exercise belongs to a repository.
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
repository_exercises_archive_path_not_null n NOT NULL archive_path
repository_exercises_checksum_not_null n NOT NULL checksum
repository_exercises_created_at_not_null n NOT NULL created_at
repository_exercises_download_url_not_null n NOT NULL download_url
repository_exercises_id_not_null n NOT NULL id
repository_exercises_name_not_null n NOT NULL name
repository_exercises_part_not_null n NOT NULL part
repository_exercises_pkey PRIMARY KEY PRIMARY KEY (id)
repository_exercises_repository_id_fkey FOREIGN KEY FOREIGN KEY (repository_id) REFERENCES exercise_repositories(id)
repository_exercises_repository_id_not_null n NOT NULL repository_id
repository_exercises_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
repository_exercises_pkey CREATE UNIQUE INDEX repository_exercises_pkey ON public.repository_exercises USING btree (id)

Relations

er

Generated by tbls