Extension:CheckUser/cu useragent clienthints map table
MediaWiki version: | ≥ 1.41 |
A table for the CheckUser extension used to store the relationship between client hint rows in cu_useragent_clienthints table and one of cu_changes , cu_log_event , or cu_private_event .
Which of the three result tables a row references depends on the value of the uachm_reference_type
column.
The table uses all three columns as a composite primary key.
Fields
edituachm_uach_id
editThe ID of the row in the cu_useragent_clienthints table that is associated with the row referenced in the uachm_reference_id
column.
uachm_reference_id
editWhich table that this column references (and the associated column to join to) is dependent on the value in the uachm_reference_type
column:
0
- This is a revision ID. The row will be in the cu_changes table, with the column to join to being cuc_this_oldid .1
- This is a log ID. The row will be in the cu_log_event table, with the column to join to being cule_log_id .2
- This is the ID for a row in the cu_private_event table, with the column to join to being cupe_id .
uachm_reference_type
editA integer mapping identifier that specifies which of the tables cu_changes , cu_log_event , or cu_private_event is referenced by the column uachm_reference_id
.
The valid mapping IDs for this column are stored in UserAgentClientHintsManager.php.
Schema
editmysql> describe cu_useragent_clienthints_map; +----------------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------------+------------------+------+-----+---------+-------+ | uachm_uach_id | int(10) unsigned | NO | PRI | NULL | | | uachm_reference_id | int(10) unsigned | NO | PRI | NULL | | | uachm_reference_type | tinyint(1) | NO | PRI | 0 | | +----------------------+------------------+------+-----+---------+-------+
Indexes
editmysql> show index in cu_useragent_clienthints_map; +------------------------------+------------+--------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +------------------------------+------------+--------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | cu_useragent_clienthints_map | 0 | PRIMARY | 1 | uachm_uach_id | A | 0 | NULL | NULL | | BTREE | | | | cu_useragent_clienthints_map | 0 | PRIMARY | 2 | uachm_reference_type | A | 0 | NULL | NULL | | BTREE | | | | cu_useragent_clienthints_map | 0 | PRIMARY | 3 | uachm_reference_id | A | 0 | NULL | NULL | | BTREE | | | | cu_useragent_clienthints_map | 1 | uachm_reference_id | 1 | uachm_reference_id | A | 0 | NULL | NULL | | BTREE | | | +------------------------------+------------+--------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+