Index

public.credit_registration_roster_schedules

Description

When enrolment discovery lists each course code’s roster. The tier (three a day while completions keep coming, then daily, and weekly with account linking on) is derived at claim time from the modules on the code, so only what cannot be derived is kept here. Modules sharing a code share its row. The per-module counters on course_module_suotar_configurations still describe what each module did with the roster. No deleted_at: a row belongs to a course code, not to anything that is deleted, and one no module uses any more is simply never claimed.

Columns

Name Type Default Nullable Children Parents Comment
consecutive_failures integer 0 false Failed listings of the code on its own since the last success. Drives the per-code backoff and the admin alert.
course_code varchar(255) false The trimmed uh_course_code the roster is listed by.
created_at timestamp with time zone now() false Timestamp when the record was created.
follow_up_fetch_at timestamp with time zone true The one later listing an unlinked student’s visit books, for an enrolment Suotar’s copy of Sisu did not have yet.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
is_fetched_alone boolean false false Set when a request batching this code with others failed as a whole: Suotar fails every code of a request for one bad one, so the code is listed on its own until a listing of it succeeds.
last_attempted_at timestamp with time zone true When a listing of the code was last sent, whether or not it arrived.
last_error credit_registration_error_code true Why the last listing of the code failed; NULL once one succeeds.
last_fetch_duration_ms integer true How long the request that last brought the roster took, in milliseconds. Shared by every code in that request.
last_fetched_at timestamp with time zone true When the roster last arrived. The tier interval is counted from here.
last_listed_person_count integer true How many enrolments the last roster listed.
retry_not_before timestamp with time zone true Until when the code is left alone after failing on its own.
triggered_fetch_at timestamp with time zone true A listing an unlinked student’s visit or check request asked for, with account linking on. Claimed before any tier.
triggered_fetch_count integer 0 false How many triggered and follow-up listings ran on triggered_fetch_day, against the daily cap.
triggered_fetch_day date true The UTC day triggered_fetch_count counts.
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.
window_closed_at timestamp with time zone true When Suotar last said it holds no realisation of the code, which it does once the last one ended over two months ago. Tier listings stop until a completion arrives after this.

Constraints

Name Type Definition
credit_registration_roster_sched_triggered_fetch_count_not_null n NOT NULL triggered_fetch_count
credit_registration_roster_schedu_consecutive_failures_not_null n NOT NULL consecutive_failures
credit_registration_roster_schedules_counts CHECK CHECK (((triggered_fetch_count >= 0) AND (consecutive_failures >= 0)))
credit_registration_roster_schedules_course_code_not_null n NOT NULL course_code
credit_registration_roster_schedules_created_at_not_null n NOT NULL created_at
credit_registration_roster_schedules_id_not_null n NOT NULL id
credit_registration_roster_schedules_is_fetched_alone_not_null n NOT NULL is_fetched_alone
credit_registration_roster_schedules_pkey PRIMARY KEY PRIMARY KEY (id)
credit_registration_roster_schedules_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
credit_registration_roster_schedules_pkey CREATE UNIQUE INDEX credit_registration_roster_schedules_pkey ON public.credit_registration_roster_schedules USING btree (id)
uq_credit_registration_roster_schedules_course_code CREATE UNIQUE INDEX uq_credit_registration_roster_schedules_course_code ON public.credit_registration_roster_schedules USING btree (course_code)

Triggers

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

Relations

er

Generated by tbls