← All tables
mdl_local_course_corporate_purchases
MIGRATECore learning content / activity / progress / assessment · 21 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 | |
| productid | 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 | |
| batchid | bigint | Nullable | '0' | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security |
| corporateadmin_id | 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 | |
| quantity | bigint | Not null | '1' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| type | varchar(50) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| purchased_seats | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| used_seats | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| available_seats | bigint | Not null | '0' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| total_amount | decimal(10,2) | Not null | '0.00' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| purchase_date | bigint | Not null | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| original_price | decimal(10,2) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| discounted_price | decimal(10,2) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| subtotal | decimal(10,2) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| taxdetails | varchar(255) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| tax_amount | decimal(10,2) | Nullable | '0.00' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| final_amount | decimal(10,2) | Nullable | '0.00' | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |
| status | varchar(20) | Not null | 'active' | Map through explicit enum/boolean translation; retain source value and test edge cases. | High: verify semantics/relationship/security |
| timecreated | bigint | Not null | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference | |
| timemodified | bigint | Not null | Convert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics. | Schema-only inference | |
| transaction_id | varchar(100) | Nullable | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security |