Index

public.credit_registration_enrolment_routes

Description

What the student said about enrolling, on the new registration page: which university relationship they have, their answers to the questions that steer open university students without strong authentication towards a certificate, whether they took the certificate, and that they have gone and enrolled. Advisory only – it picks which instructions to show and how far the page’s step list has come, and the pipeline neither reads it nor waits for it. Kept apart from course_module_completions because a completion is a graded fact and this is one person’s answer to a question about it.

Columns

Name Type Default Nullable Children Parents Comment
certificate_chosen_at timestamp with time zone true When the student said a certificate is enough and took it instead of registering credits. Null until they do, and cleared again if they take it back. Advisory like the rest of the row: the pipeline still registers the completion.
course_module_completion_id uuid false public.course_module_completions The completion the student answered about. Unique among live rows: the answer is replaced rather than versioned.
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.
enrolment_confirmed_at timestamp with time zone true When the student pressed Done to say they had enrolled. Null until they do, and cleared again if they take it back, which stays possible only until an enrolment is found – after that the answer no longer changes anything.
has_finnish_personal_identity_code boolean true The student’s answer to whether they are Finnish or have a Finnish personal identity code, asked of open university students because enrolling needs strong authentication. Null until answered. Kept when the route changes, so a student who switches back finds their answers.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
identification credit_registration_identification true How the student said they can identify themselves for enrolling: eidas, another Suomi.fi method, or none. Asked of those who said they need credits. Null until answered.
need credit_registration_need true Whether the student said they need a certificate or credits in the study registry, asked of those without a Finnish personal identity code. Null until answered.
need_after_reconsider credit_registration_need true What the student said they need when asked again after saying they have no way to identify themselves, which makes enrolling slow. Null until answered.
route credit_registration_enrolment_route false Which university relationship the student picked, which decides only where they are told to enrol. Not evidence of anything: it is unverified self-report, and the study registry is what actually settles whether an enrolment exists.
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.
user_id uuid false public.users The student who answered. Always the completion’s own user; stored so the answer can be scoped to a user without joining.

Constraints

Name Type Definition
credit_registration_enrolme_course_module_completion_i_not_null n NOT NULL course_module_completion_id
credit_registration_enrolment__course_module_completion_id_fkey FOREIGN KEY FOREIGN KEY (course_module_completion_id) REFERENCES course_module_completions(id)
credit_registration_enrolment_routes_created_at_not_null n NOT NULL created_at
credit_registration_enrolment_routes_id_not_null n NOT NULL id
credit_registration_enrolment_routes_pkey PRIMARY KEY PRIMARY KEY (id)
credit_registration_enrolment_routes_route_not_null n NOT NULL route
credit_registration_enrolment_routes_updated_at_not_null n NOT NULL updated_at
credit_registration_enrolment_routes_user_id_fkey FOREIGN KEY FOREIGN KEY (user_id) REFERENCES users(id)
credit_registration_enrolment_routes_user_id_not_null n NOT NULL user_id

Indexes

Name Definition
credit_registration_enrolment_routes_pkey CREATE UNIQUE INDEX credit_registration_enrolment_routes_pkey ON public.credit_registration_enrolment_routes USING btree (id)
uq_credit_registration_enrolment_routes_completion CREATE UNIQUE INDEX uq_credit_registration_enrolment_routes_completion ON public.credit_registration_enrolment_routes USING btree (course_module_completion_id, deleted_at) NULLS NOT DISTINCT

Triggers

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

Relations

er

Generated by tbls