A table to store a subset of rows which currently go into the cu_private_event table is needed. These rows will be for private events performed by IP addresses, as when temporary accounts are enabled we cannot get an actor ID. The proposed schema of this table is:
MariaDB [my_database]> describe cu_private_event_no_actor; +-------------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------+---------------------+------+-----+---------+----------------+ | cupena_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment | | cupena_namespace | int(11) | NO | | 0 | | | cupena_title | varbinary(255) | NO | | NULL | | | cupena_log_type | varbinary(32) | NO | | NULL | | | cupena_log_action | varbinary(32) | NO | | NULL | | | cupena_params | blob | NO | | NULL | | | cupena_comment_id | bigint(20) unsigned | NO | | NULL | | | cupena_page | int(10) unsigned | NO | | NULL | | | cupena_timestamp | binary(14) | NO | MUL | NULL | | | cupena_ip_hex | varbinary(255) | YES | MUL | NULL | | | cupena_xff | varbinary(255) | YES | | NULL | | | cupena_xff_hex | varbinary(255) | YES | MUL | NULL | | | cupena_agent_id | bigint(20) unsigned | NO | | NULL | | +-------------------+---------------------+------+-----+---------+----------------+
The indexes in this table:
MariaDB [my_database]> show indexes in cu_private_event_no_actor; +---------------------------+------------+---------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored | +---------------------------+------------+---------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | cu_private_event_no_actor | 0 | PRIMARY | 1 | cupena_id | A | 0 | NULL | NULL | | BTREE | | | NO | | cu_private_event_no_actor | 1 | cupena_ip_hex_time | 1 | cupena_ip_hex | A | 0 | NULL | NULL | YES | BTREE | | | NO | | cu_private_event_no_actor | 1 | cupena_ip_hex_time | 2 | cupena_timestamp | A | 0 | NULL | NULL | | BTREE | | | NO | | cu_private_event_no_actor | 1 | cupena_xff_hex_time | 1 | cupena_xff_hex | A | 0 | NULL | NULL | YES | BTREE | | | NO | | cu_private_event_no_actor | 1 | cupena_xff_hex_time | 2 | cupena_timestamp | A | 0 | NULL | NULL | | BTREE | | | NO | | cu_private_event_no_actor | 1 | cupena_timestamp | 1 | cupena_timestamp | A | 0 | NULL | NULL | | BTREE | | | NO | +---------------------------+------------+---------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
Acceptance criteria
- Create the cu_private_event_no_actor table