Index

public.credit_registration_enrolment_check_outcomes

Description

One row per answered enrolment check of a row waiting for an enrolment: the data the check schedules are tuned from, offline. Ids and times only, and kept for 400 days, well past the call log’s 90. Append-only and hard-deleted by the retention sweep, so there is no updated_at or deleted_at.

Columns

Name Type Default Nullable Children Parents Comment
checked_at timestamp with time zone false When Suotar answered.
course_module_id uuid false public.course_modules The row’s module, kept so outcomes can be grouped by course without the ledger.
created_at timestamp with time zone now() false Timestamp when the record was created.
credit_registration_id uuid false public.credit_registrations The row that was checked.
due_at timestamp with time zone true The schedule time of that step. Lateness is checked_at minus this, on schedule checks.
enrolled_at timestamp with time zone true When the enrolment found was made, as Sisu records it; NULL when none was found or Sisu gives no time.
enrolment_check_group enrolment_check_group false The row’s group when it was checked.
enrolment_check_step integer true The schedule step the row was waiting for. NULL once the schedule had run out.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
is_enrolment_found boolean false Whether the check found an enrolment the row can be registered against.
previous_checked_at timestamp with time zone true When the row was last checked before this, NULL for its first check. With checked_at it brackets when an enrolment found here appeared.
source enrolment_check_source false What made the check run.

Constraints

Name Type Definition
credit_registration_enrolment_c_credit_registration_id_not_null n NOT NULL credit_registration_id
credit_registration_enrolment_ch_enrolment_check_group_not_null n NOT NULL enrolment_check_group
credit_registration_enrolment_check_credit_registration_id_fkey FOREIGN KEY FOREIGN KEY (credit_registration_id) REFERENCES credit_registrations(id)
credit_registration_enrolment_check_is_enrolment_found_not_null n NOT NULL is_enrolment_found
credit_registration_enrolment_check_o_course_module_id_not_null n NOT NULL course_module_id
credit_registration_enrolment_check_outco_course_module_id_fkey FOREIGN KEY FOREIGN KEY (course_module_id) REFERENCES course_modules(id)
credit_registration_enrolment_check_outcome_checked_at_not_null n NOT NULL checked_at
credit_registration_enrolment_check_outcome_created_at_not_null n NOT NULL created_at
credit_registration_enrolment_check_outcomes_id_not_null n NOT NULL id
credit_registration_enrolment_check_outcomes_pkey PRIMARY KEY PRIMARY KEY (id)
credit_registration_enrolment_check_outcomes_source_not_null n NOT NULL source

Indexes

Name Definition
credit_registration_enrolment_check_outcomes_pkey CREATE UNIQUE INDEX credit_registration_enrolment_check_outcomes_pkey ON public.credit_registration_enrolment_check_outcomes USING btree (id)
idx_credit_registration_enrolment_check_outcomes_checked CREATE INDEX idx_credit_registration_enrolment_check_outcomes_checked ON public.credit_registration_enrolment_check_outcomes USING btree (checked_at DESC)
idx_credit_registration_enrolment_check_outcomes_registration CREATE INDEX idx_credit_registration_enrolment_check_outcomes_registration ON public.credit_registration_enrolment_check_outcomes USING btree (credit_registration_id)

Relations

er

Generated by tbls