← All tables
mdl_grade_items_history
MIGRATECore learning content / activity / progress / assessment · 34 columnsProposed target
Transform into target course, module, attempt, grade, completion, credential and content models
Migration rule
Preserve history and relationships; retain original IDs in legacy_id fields
Verification required
Plugin behavior, attempt state, grading rules, file references and completion logic require application-level verification
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 | |
| action | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| oldid | 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 | |
| source | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| timemodified | bigint | Nullable | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference | |
| loggeduser | bigint | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| courseid | bigint | Nullable | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| categoryid | bigint | Nullable | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| itemname | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| itemtype | varchar(30) | Not null | '' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| itemmodule | varchar(30) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| iteminstance | bigint | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| itemnumber | bigint | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| iteminfo | longtext | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| idnumber | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| calculation | longtext | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| gradetype | smallint | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| grademax | decimal(10,5) | Not null | '100.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| grademin | decimal(10,5) | Not null | '0.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| scaleid | bigint | Nullable | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| outcomeid | bigint | Nullable | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security | |
| gradepass | decimal(10,5) | Not null | '0.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| multfactor | decimal(10,5) | Not null | '1.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| plusfactor | decimal(10,5) | Not null | '0.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| aggregationcoef | decimal(10,5) | Not null | '0.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| aggregationcoef2 | decimal(10,5) | Not null | '0.00000' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| sortorder | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| hidden | bigint | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| locked | bigint | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | Schema-only inference |
| locktime | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| needsupdate | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| display | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| decimals | tinyint(1) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| weightoverride | tinyint(1) | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |