← All tables
mdl_course_modules_completion
MIGRATELearner activity completion · 6 columnsProposed target
activity_completions
Migration rule
Preserve user, course-module, completion state, timestamps and viewed flag
Verification required
Verify completion rules and completionstate values against Moodle version and plugin code.
Tracking
Sign in to update status, owner and notes.
| Column | Type | Null | Default | Target mapping | Risk |
|---|---|---|---|---|---|
| id | bigint | Not null | Preserve as legacy source ID; generate target PK unless target accepts stable legacy key. | High: verify semantics/relationship/security | |
| coursemoduleid | bigint | Not null | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| userid | bigint | Not null | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| completionstate | tinyint(1) | Not null | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference | |
| overrideby | bigint | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| timemodified | bigint | Not null | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |