← All tables
mdl_user
MIGRATEUser profile (not credentials) · 48 columnsProposed target
users + user_profiles + external_identity_links
Migration rule
Preserve profile and status; never migrate password hash as active login credential
Verification required
Map Moodle user.id to legacy_moodle_user_id; link by IdP immutable subject after reconciliation. Verify username/email collisions, deleted/suspended flags, consent and custom profile fields.
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 | |
| auth | varchar(20) | Not null | 'manual' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| confirmed | tinyint(1) | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| policyagreed | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| deleted | tinyint(1) | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| suspended | tinyint(1) | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| mnethostid | 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 |
| username | varchar(100) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| password | varchar(255) | Not null | '' | EXCLUDE from app migration; credential/secret handling requires security review. | High: verify semantics/relationship/security |
| idnumber | varchar(255) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| firstname | varchar(100) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| lastname | varchar(100) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| varchar(100) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| emailstop | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| phone1 | varchar(20) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| phone2 | varchar(20) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| institution | varchar(255) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| department | varchar(255) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| address | varchar(255) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| city | varchar(120) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| country | varchar(2) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| lang | varchar(30) | Not null | 'en' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| calendartype | varchar(30) | Not null | 'gregorian' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| theme | varchar(50) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| timezone | varchar(100) | Not null | '99' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| firstaccess | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| lastaccess | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| lastlogin | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| currentlogin | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| lastip | varchar(45) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| secret | varchar(15) | Not null | '' | EXCLUDE from app migration; credential/secret handling requires security review. | High: verify semantics/relationship/security |
| picture | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| description | longtext | Nullable | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference | |
| descriptionformat | tinyint | Not null | '1' | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | Schema-only inference |
| mailformat | tinyint(1) | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| maildigest | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| maildisplay | tinyint | Not null | '2' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| autosubscribe | tinyint(1) | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| trackforums | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| 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 |
| trustbitmask | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| imagealt | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| lastnamephonetic | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| firstnamephonetic | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| middlename | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| alternatename | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| moodlenetprofile | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |