What the student said about enrolling, on the new registration page: which university relationship they have, and that they have gone and enrolled. Advisory only – it picks which enrolment 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.
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| 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. | |||
| id | uuid | uuid_generate_v4() | false | A unique, stable identifier for the record. | ||
| 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. |
| 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 |
| 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 |
| Name | Definition |
|---|---|
| set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.credit_registration_enrolment_routes FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls