Role Table Schema (role)


Description

moodle roles

role table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
badge_manual_award.issuerrole badgmanuawar_iss4_fk R
enrol.roleid Implied Constraint R
enrol_flatfile.roleid enroflat_rol2_fk R
mnetservice_enrol_courses.roleid Implied Constraint R
role_allow_assign.allowassign rolealloassi_all2_fk R
role_allow_assign.roleid rolealloassi_rol2_fk R
role_allow_override.allowoverride rolealloover_all2_fk R
role_allow_override.roleid rolealloover_rol2_fk R
role_allow_switch.allowswitch rolealloswit_all2_fk R
role_allow_switch.roleid rolealloswit_rol2_fk R
role_allow_view.allowview rolealloview_all2_fk R
role_allow_view.roleid rolealloview_rol2_fk R
role_assignments.roleid roleassi_rol2_fk R
role_capabilities.roleid rolecapa_rol2_fk R
role_context_levels.roleid rolecontleve_rol2_fk R
role_names.roleid rolename_rol2_fk R
stats_daily.roleid Implied Constraint R
stats_monthly.roleid Implied Constraint R
stats_user_daily.roleid Implied Constraint R
stats_user_monthly.roleid Implied Constraint R
stats_user_weekly.roleid Implied Constraint R
stats_weekly.roleid Implied Constraint R
tool_cohortroles.roleid Implied Constraint R
tool_dataprivacy_purposerole.roleid tooldatapurp_rol2_fk R
name VARCHAR 255

Empty names are automatically localised

shortname VARCHAR 100
description LONGTEXT 2147483647 null

Empty descriptions may be automatically localised

sortorder BIGINT 19 0
archetype VARCHAR 30

Role archetype is used during install and role reset, marks admin role and helps in site settings

Table contained -1 rows

role table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
role_sho_uix Must be unique Asc shortname
role_sor_uix Must be unique Asc sortorder

role table relationships