Index

public.retired_repository_exercise_archives

Description

Repository exercise archives replaced by a sync or left behind by a removed exercise or repository. The object is removed from the file store once no live repository exercise has it and no live exercise task uses a removed one that has it.

Columns

Name Type Default Nullable Children Parents Comment
archive_path text false File store path of the archive.
created_at timestamp with time zone now() false Timestamp when the archive was retired.
deleted_at timestamp with time zone true Timestamp when the archive was removed from the file store. If null, it is still stored.
download_url text false The URL of the archive.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
repository_id uuid false public.exercise_repositories The repository whose sync or deletion retired the archive.
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
retired_repository_exercise_archives_archive_path_not_null n NOT NULL archive_path
retired_repository_exercise_archives_created_at_not_null n NOT NULL created_at
retired_repository_exercise_archives_download_url_not_null n NOT NULL download_url
retired_repository_exercise_archives_id_not_null n NOT NULL id
retired_repository_exercise_archives_pkey PRIMARY KEY PRIMARY KEY (id)
retired_repository_exercise_archives_repository_id_fkey FOREIGN KEY FOREIGN KEY (repository_id) REFERENCES exercise_repositories(id)
retired_repository_exercise_archives_repository_id_not_null n NOT NULL repository_id
retired_repository_exercise_archives_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
idx_retired_repository_exercise_archives_repository_id CREATE INDEX idx_retired_repository_exercise_archives_repository_id ON public.retired_repository_exercise_archives USING btree (repository_id) WHERE (deleted_at IS NULL)
retired_repository_exercise_archives_pkey CREATE UNIQUE INDEX retired_repository_exercise_archives_pkey ON public.retired_repository_exercise_archives USING btree (id)

Triggers

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

Relations

er

Generated by tbls