← All tables
mdl_role_assignments
TRANSFORMRole assignments · 9 columnsProposed target
user_course_roles / access_assignments
Migration rule
Map role, user, context and component; retain source context lineage
Verification required
Moodle context hierarchy/capabilities differ from app RBAC; derive target access rules with security review.
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 | |
| roleid | 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 |
| contextid | 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 |
| userid | 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 |
| timemodified | bigint | Not null | '0' | 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 |
| component | varchar(100) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| itemid | 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 |
| sortorder | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |