0 rows


Stores the relationship between an arbitrary item (itemtype,


Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
component VARCHAR 100

Defines the Moodle component in which the favourite was created.

itemtype VARCHAR 100

The type of the item which is being favourited. Usually a table name, but doesn’t have to be. E.g. ‘messages’ or ‘message_conversations’.

itemid BIGINT 19 null

The identifier of the item which is being favourited.

contextid BIGINT 19 null
context.id favo_con2_fkR

The context id of the item being favourited

userid BIGINT 19 null
user.id favo_use2_fkR

The id of the user to whom the favourite belongs

ordering BIGINT 19 null

Optional ordering of the favourite within its context area. For example, this allows things like sorting favourite message conversations.

timecreated BIGINT 19 null

Creation time

timemodified BIGINT 19 null

Last modification time


Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
favo_comiteiteconuse2_uix Must be unique Asc/Asc/Asc/Asc/Asc component + itemtype + itemid + contextid + userid
favo_con4_ix Performance Asc contextid
favo_use4_ix Performance Asc userid