← All tables

mdl_user_enrolments

MIGRATEUser course enrolments · 9 columns

Proposed target

course_enrolments

Migration rule

Preserve enrolment instance, user, status, start/end and audit timestamps

Verification required

Resolve enrol.id and user.id references; map active/expired/suspended statuses explicitly.

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
statusbigintNot null'0'Map through explicit enum/boolean translation; retain source value and test edge cases.High: verify semantics/relationship/security
enrolidbigintNot 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
timestartbigintNot null'0'Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference
timeendbigintNot null'2147483647'Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference
modifieridbigintNot null'0'Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
timecreatedbigintNot null'0'Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference
timemodifiedbigintNot null'0'Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference