Index

public.exercise_repositories

Description

A git repository that contains exercises.

Columns

Name Type Default Nullable Children Parents Comment
course_id uuid true public.courses Each repository is related to some course. The same repository can be added to different courses and managed separately.
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.
deploy_key varchar(1024) true If set, the key will be used to access the repository.
error_message text true If something went wrong when processing this repository, this column may contain information about the error.
exam_id uuid true public.exams
id uuid uuid_generate_v4() false public.repository_exercises A unique, stable identifier for the record.
status exercise_repository_status ‘pending’::exercise_repository_status false The status of the process for adding the 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.
url varchar(255) false The git url for the repository.

Constraints

Name Type Definition
exercise_repositories_check CHECK CHECK (((course_id IS NULL) <> (exam_id IS NULL)))
exercise_repositories_course_id_fkey FOREIGN KEY FOREIGN KEY (course_id) REFERENCES courses(id)
exercise_repositories_exam_id_fkey FOREIGN KEY FOREIGN KEY (exam_id) REFERENCES exams(id)
exercise_repositories_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
exercise_repositories_pkey CREATE UNIQUE INDEX exercise_repositories_pkey ON public.exercise_repositories USING btree (id)

Relations

er

Generated by tbls