Totara Userdata Purge Table Schema (totara_userdata_purge)


List of all user data purges and their result

totara_userdata_purge table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
totara_userdata_purge_item.purgeid totauserpurgitem_pur2_fk R
purgetypeid BIGINT 19 null totauserpurg_pur2_fk R
origin VARCHAR 50

suspended, deleted or manual keyword matching totara_userdata_purge_type allowxxxx columns, use other keyword for custom code

userid BIGINT 19 null totauserpurg_use2_fk R

The target user

usercontextid BIGINT 19 null Implied Constraint R

User context id, we need the value here because user deletion removes user context record

contextid BIGINT 19 null Implied Constraint R

Context restriction will be used for resetting user data in one course or activity, null means the whole system

usercreated BIGINT 19 null
timecreated BIGINT 19 null

The time of creation of this purge, in case of manual purges this is the time when user requested the purge

timestarted BIGINT 19 null

Start of purge process, this happens in scheduled task or ad-hoc task

timefinished BIGINT 19 null

End of purge or time when marked as timed out

result BIGINT 19 null

null means not finished, -1 completed ok, -2 means error, -3 means skipped, -4 cancelled, -5 timed out

Table contained -1 rows

totara_userdata_purge table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
totauserpurg_pur_ix Performance Asc purgetypeid
totauserpurg_use_ix Performance Asc userid

totara_userdata_purge table relationships