← All tables
mdl_sessions
EXCLUDEWeb sessions · 9 columnsProposed target
None; force reauthentication via IdP
Migration rule
Session state is ephemeral and invalid across app/platform boundary
Verification required
Invalidate source sessions at cutover; confirm SSO session lifetime and logout behavior.
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 | |
| state | bigint | Not null | '0' | Map through explicit enum/boolean translation; retain source value and test edge cases. | High: verify semantics/relationship/security |
| sid | varchar(128) | Not null | '' | Resolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs. | High: verify semantics/relationship/security |
| userid | 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 | |
| sessdata | longtext | Nullable | Transform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references. | 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 | |
| firstip | varchar(45) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference | |
| lastip | varchar(45) | Nullable | Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning. | Schema-only inference |