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

uachm_uach_id

The 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

Which table that this column references (and the associated column to join to) is dependent on the value in the uachm_reference_type column:

uachm_reference_type

A 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

mysql> 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

mysql> 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      |         |               |
+------------------------------+------------+--------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+