← All tables

mdl_course_modules_completion

MIGRATELearner activity completion · 6 columns

Proposed 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.

ColumnTypeNullDefaultTarget mappingRisk
idbigintNot nullPreserve as legacy source ID; generate target PK unless target accepts stable legacy key.High: verify semantics/relationship/security
coursemoduleidbigintNot nullResolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
useridbigintNot nullResolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
completionstatetinyint(1)Not nullMap through explicit enum/boolean translation; retain source value and test edge cases.Schema-only inference
overridebybigintNullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
timemodifiedbigintNot nullConvert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference