Completed course module completion registrations to study registries.
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| course_id | uuid | false | public.courses | Course that the completion is a part of. | ||
| course_module_completion_id | uuid | false | public.course_module_completions | Course module completion for this registation. | ||
| course_module_id | uuid | false | public.course_modules | Course module that the related course module completion is based on. | ||
| 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. | |||
| id | uuid | uuid_generate_v4() | false | |||
| real_student_number | varchar(255) | false | Used by administrators and support staff to confirm the completion was registered to the correct student | |||
| study_registry_registrar_id | uuid | true | public.study_registry_registrars | Registrar that registered this course module completion. Null when this platform registered the attainment itself: that is not a third party with a key to this API, so it has no registrar row, and null is what tells the two kinds of row apart. The pull endpoints have to exclude null rows alongside the calling registrar’s own. | ||
| 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 | User that the related course module completion is based on. |
| Name | Definition |
|---|---|
| Credit registration | How a completed course module becomes a credit in the University of Helsinki study registry. Enrolment on the course is itself the student’s consent to register the credit; once a student number is proven to be theirs, one ledger row per completion is pushed to Sisu through Suotar and polled until the registry confirms the attainment. |
| Name | Type | Definition |
|---|---|---|
| course_module_completion_re_course_module_completion_i_not_null | n | NOT NULL course_module_completion_id |
| course_module_completion_regis_course_module_completion_id_fkey | FOREIGN KEY | FOREIGN KEY (course_module_completion_id) REFERENCES course_module_completions(id) |
| course_module_completion_regis_study_registry_registrar_id_fkey | FOREIGN KEY | FOREIGN KEY (study_registry_registrar_id) REFERENCES study_registry_registrars(id) |
| course_module_completion_registere_real_student_number_not_null | n | NOT NULL real_student_number |
| course_module_completion_registered_t_course_module_id_not_null | n | NOT NULL course_module_id |
| course_module_completion_registered_to_st_course_module_id_fkey | FOREIGN KEY | FOREIGN KEY (course_module_id) REFERENCES course_modules(id) |
| course_module_completion_registered_to_stud_created_at_not_null | n | NOT NULL created_at |
| course_module_completion_registered_to_stud_updated_at_not_null | n | NOT NULL updated_at |
| course_module_completion_registered_to_study_course_id_not_null | n | NOT NULL course_id |
| course_module_completion_registered_to_study_r_user_id_not_null | n | NOT NULL user_id |
| course_module_completion_registered_to_study_reg_course_id_fkey | FOREIGN KEY | FOREIGN KEY (course_id) REFERENCES courses(id) |
| course_module_completion_registered_to_study_regis_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
| course_module_completion_registered_to_study_regist_id_not_null | n | NOT NULL id |
| course_module_completion_registered_to_study_registries_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| Name | Definition |
|---|---|
| cmc_registered_to_study_registries_completion_registrar_idx | CREATE UNIQUE INDEX cmc_registered_to_study_registries_completion_registrar_idx ON public.course_module_completion_registered_to_study_registries USING btree (course_module_completion_id, study_registry_registrar_id) NULLS NOT DISTINCT WHERE (deleted_at IS NULL) |
| cmc_registered_to_study_registries_course_id_idx | CREATE INDEX cmc_registered_to_study_registries_course_id_idx ON public.course_module_completion_registered_to_study_registries USING btree (course_id) WHERE (deleted_at IS NULL) |
| course_module_completion_registered_to_study_registries_pkey | CREATE UNIQUE INDEX course_module_completion_registered_to_study_registries_pkey ON public.course_module_completion_registered_to_study_registries USING btree (id) |
| Name | Definition |
|---|---|
| set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.course_module_completion_registered_to_study_registries FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls