← All tables

mdl_user

MIGRATEUser profile (not credentials) · 48 columns

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

ColumnTypeNullDefaultTarget mappingRisk
idbigintNot nullPreserve as legacy source ID; generate target PK unless target accepts stable legacy key.High: verify semantics/relationship/security
authvarchar(20)Not null'manual'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
confirmedtinyint(1)Not null'0'Map through explicit enum/boolean translation; retain source value and test edge cases.Schema-only inference
policyagreedtinyint(1)Not null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
deletedtinyint(1)Not null'0'Map through explicit enum/boolean translation; retain source value and test edge cases.Schema-only inference
suspendedtinyint(1)Not null'0'Map through explicit enum/boolean translation; retain source value and test edge cases.Schema-only inference
mnethostidbigintNot null'0'Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
usernamevarchar(100)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
passwordvarchar(255)Not null''EXCLUDE from app migration; credential/secret handling requires security review.High: verify semantics/relationship/security
idnumbervarchar(255)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
firstnamevarchar(100)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
lastnamevarchar(100)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
emailvarchar(100)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
emailstoptinyint(1)Not null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
phone1varchar(20)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
phone2varchar(20)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
institutionvarchar(255)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
departmentvarchar(255)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
addressvarchar(255)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
cityvarchar(120)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
countryvarchar(2)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
langvarchar(30)Not null'en'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
calendartypevarchar(30)Not null'gregorian'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
themevarchar(50)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
timezonevarchar(100)Not null'99'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
firstaccessbigintNot null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
lastaccessbigintNot null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
lastloginbigintNot null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
currentloginbigintNot null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
lastipvarchar(45)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
secretvarchar(15)Not null''EXCLUDE from app migration; credential/secret handling requires security review.High: verify semantics/relationship/security
picturebigintNot null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
descriptionlongtextNullableTransform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references.Schema-only inference
descriptionformattinyintNot null'1'Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references.Schema-only inference
mailformattinyint(1)Not null'1'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
maildigesttinyint(1)Not null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
maildisplaytinyintNot null'2'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
autosubscribetinyint(1)Not null'1'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
trackforumstinyint(1)Not null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
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
trustbitmaskbigintNot null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
imagealtvarchar(255)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
lastnamephoneticvarchar(255)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
firstnamephoneticvarchar(255)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
middlenamevarchar(255)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
alternatenamevarchar(255)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
moodlenetprofilevarchar(255)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference