← All tables
mdl_user_enrolments
MIGRATEUser course enrolments · 9 columnsProposed 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.
| 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 | |
| status | bigint | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | High: verify semantics/relationship/security |
| enrolid | 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 | |
| timestart | bigint | Not null | '0' | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |
| timeend | bigint | Not null | '2147483647' | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |
| modifierid | bigint | Not null | '0' | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security |
| timecreated | bigint | Not null | '0' | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |
| timemodified | bigint | Not null | '0' | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference |