← All tables

mdl_cohort

MIGRATEIdentity / profile / access / user extension · 11 columns

Proposed target

Map to users, profiles, external_identity_links, memberships/enrolments as applicable

Migration rule

Preserve Moodle IDs in legacy_id; use immutable IdP subject for login identity

Verification required

Verify PII fields, custom profile semantics, deleted/suspended users, duplicate email and foreign keys

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
contextidbigintNot nullResolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
namevarchar(254)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
idnumbervarchar(100)NullableMap 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 nullTransform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references.Schema-only inference
visibletinyint(1)Not null'1'Map through explicit enum/boolean translation; retain source value and test edge cases.Schema-only inference
componentvarchar(100)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
timecreatedbigintNot nullConvert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference
timemodifiedbigintNot nullConvert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference
themevarchar(50)NullableMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference