← All tables

mdl_question_attempts

MIGRATEAssessment attempt state · 14 columns

Proposed target

assessment_attempts

Migration rule

Preserve usage/slot/question links, attempt number, state and marks

Verification required

Must include question_usages, question_attempt_steps and step_data; validate resumability vs historical read-only needs.

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
questionusageidbigintNot nullResolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
slotbigintNot nullMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
behaviourvarchar(32)Not null''Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
questionidbigintNot nullResolve to target foreign key via source-ID crosswalk; do not assume numeric IDs match target IDs.High: verify semantics/relationship/security
variantbigintNot null'1'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
maxmarkdecimal(12,7)Not nullMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
minfractiondecimal(12,7)Not nullMap same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
maxfractiondecimal(12,7)Not null'1.0000000'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
flaggedtinyint(1)Not null'0'Map same-named field where semantics match; confirm target type, nullability, defaults and business meaning.Schema-only inference
questionsummarylongtextNullableTransform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references.Schema-only inference
rightanswerlongtextNullableTransform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references.Schema-only inference
responsesummarylongtextNullableTransform text/JSON/HTML as appropriate; sanitize and rewrite embedded Moodle URLs/file references.Schema-only inference
timemodifiedbigintNot nullConvert Unix epoch to UTC timestamp; verify 0/null sentinel and date semantics.Schema-only inference