Jump to content

Extension:AbuseFilter/abuse_filter_log table

From mediawiki.org

Fields

[edit]

afl_id

[edit]

Primary key

afl_global

[edit]

Whether the filter triggered is a global filter. 1 if it's a global filter, 0 otherwise.

afl_filter_id

[edit]

Number of the filter triggered.

afl_user

[edit]

User ID of the author of the action.

afl_user_text

[edit]

User name of the author of the action.

afl_ip

[edit]
MediaWiki version:
≤ 1.45

The IP address user was using when the filter was triggered.

afl_ip_hex

[edit]
MediaWiki version:
≥ 1.45

The IP address user was using when the filter was triggered in hexadecimal form.

afl_action

[edit]

The action which triggered the filter. Values can include the following values: edit, delete, createaccount, move, upload, autocreateaccount, stashupload

afl_actions

[edit]

What the filter made about the action, comma-imploded. Example:

disallow,tag

afl_var_dump

[edit]

Value of the variables of the filter that matched the edit, previously stored as a serialized PHP array. If the content is stored-text: followed by a number, then the content is not stored here but in the text table, and the number is the old_id identifier of that table. This is the default since MediaWiki 1.19. If external storage is enabled, content will be in the default external store. Prior to MediaWiki 1.21, instead of a native PHP array, an instance of AbuseFilterVariableHolder class was being serialized. To differentiate this, the nativeDataArray flag is added to the text table on new entries. Since 1.44, this may be a JSON array containing the values of protected variables which will expire.

Example:

stored-text:66019837

afl_timestamp

[edit]

Typical MediaWiki timestamp of the action filtered and hence of the abuse log entry about it.

afl_namespace

[edit]

Target Namespace of the filtered action.

afl_title

[edit]

Target title of the filter action.

afl_wiki

[edit]

If global abuse filters are in use, this field is populated on the central DB and holds the ID of the wiki where the filter was triggered. Same format as wfWikiID.

afl_deleted

[edit]

Whether the AbuseLog entry was suppressed. 1 if suppressed, 0 otherwise.

afl_patrolled_by

[edit]
MediaWiki version:
≤ 1.43

Unused.

afl_rev_id

[edit]

Foreign key to revision.rev_id, only populated for saved edits in order to show a diff link.

Schema

[edit]
MediaWiki version:
≥ 1.45
mysql> describe abuse_filter_log;
+---------------+---------------------+------+-----+---------+----------------+
| Field         | Type                | Null | Key | Default | Extra          |
+---------------+---------------------+------+-----+---------+----------------+
| afl_id        | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| afl_global    | tinyint(1)          | NO   | MUL | NULL    |                |
| afl_filter_id | bigint(20) unsigned | NO   |     | NULL    |                |
| afl_user      | bigint(20) unsigned | NO   | MUL | NULL    |                |
| afl_user_text | varbinary(255)      | NO   |     | NULL    |                |
| afl_ip_hex    | varbinary(255)      | NO   | MUL | NULL    |                |
| afl_action    | varbinary(255)      | NO   |     | NULL    |                |
| afl_actions   | varbinary(255)      | NO   |     | NULL    |                |
| afl_var_dump  | blob                | NO   | MUL | NULL    |                |
| afl_timestamp | binary(14)          | NO   | MUL | NULL    |                |
| afl_namespace | int(11)             | NO   | MUL | NULL    |                |
| afl_title     | varbinary(255)      | NO   |     | NULL    |                |
| afl_wiki      | varbinary(64)       | YES  | MUL | NULL    |                |
| afl_deleted   | tinyint(1)          | NO   |     | 0       |                |
| afl_rev_id    | int(10) unsigned    | YES  | MUL | NULL    |                |
+---------------+---------------------+------+-----+---------+----------------+
MediaWiki version:
1.44
mysql> describe abuse_filter_log;
+---------------+---------------------+------+-----+---------+----------------+
| Field         | Type                | Null | Key | Default | Extra          |
+---------------+---------------------+------+-----+---------+----------------+
| afl_id        | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| afl_global    | tinyint(1)          | NO   | MUL | NULL    |                |
| afl_filter_id | bigint(20) unsigned | NO   |     | NULL    |                |
| afl_user      | bigint(20) unsigned | NO   | MUL | NULL    |                |
| afl_user_text | varbinary(255)      | NO   |     | NULL    |                |
| afl_ip        | varbinary(255)      | NO   | MUL |         |                |
| afl_action    | varbinary(255)      | NO   |     | NULL    |                |
| afl_actions   | varbinary(255)      | NO   |     | NULL    |                |
| afl_var_dump  | blob                | NO   | MUL | NULL    |                |
| afl_timestamp | binary(14)          | NO   | MUL | NULL    |                |
| afl_namespace | int(11)             | NO   | MUL | NULL    |                |
| afl_title     | varbinary(255)      | NO   |     | NULL    |                |
| afl_wiki      | varbinary(64)       | YES  | MUL | NULL    |                |
| afl_deleted   | tinyint(1)          | NO   |     | 0       |                |
| afl_rev_id    | int(10) unsigned    | YES  | MUL | NULL    |                |
+---------------+---------------------+------+-----+---------+----------------+


MediaWiki version:
≤ 1.43
mysql> describe abuse_filter_log;
+------------------+---------------------+------+-----+---------+----------------+
| Field            | Type                | Null | Key | Default | Extra          |
+------------------+---------------------+------+-----+---------+----------------+
| afl_id           | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| afl_global       | tinyint(1)          | NO   | MUL | NULL    |                |
| afl_filter_id    | bigint(20) unsigned | NO   |     | NULL    |                |
| afl_user         | bigint(20) unsigned | NO   | MUL | NULL    |                |
| afl_user_text    | varbinary(255)      | NO   |     | NULL    |                |
| afl_ip           | varbinary(255)      | NO   | MUL | NULL    |                |
| afl_action       | varbinary(255)      | NO   |     | NULL    |                |
| afl_actions      | varbinary(255)      | NO   |     | NULL    |                |
| afl_var_dump     | blob                | NO   |     | NULL    |                |
| afl_timestamp    | binary(14)          | NO   | MUL | NULL    |                |
| afl_namespace    | int(11)             | NO   | MUL | NULL    |                |
| afl_title        | varbinary(255)      | NO   |     | NULL    |                |
| afl_wiki         | varbinary(64)       | YES  | MUL | NULL    |                |
| afl_deleted      | tinyint(1)          | NO   |     | 0       |                |
| afl_patrolled_by | int(10) unsigned    | NO   |     | 0       |                |
| afl_rev_id       | int(10) unsigned    | YES  | MUL | NULL    |                |
+------------------+---------------------+------+-----+---------+----------------+

Indexes

[edit]
MediaWiki version:
≥ 1.45
show indexes from abuse_filter_log;
+------------------+------------+---------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
| Table            | Non_unique | Key_name                  | Seq_in_index | Column_name   | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored |
+------------------+------------+---------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
| abuse_filter_log |          0 | PRIMARY                   |            1 | afl_id        | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_filter_timestamp_full |            1 | afl_global    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_filter_timestamp_full |            2 | afl_filter_id | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_filter_timestamp_full |            3 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_user_timestamp        |            1 | afl_user      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_user_timestamp        |            2 | afl_user_text | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_user_timestamp        |            3 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_timestamp             |            1 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_page_timestamp        |            1 | afl_namespace | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_page_timestamp        |            2 | afl_title     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_page_timestamp        |            3 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_rev_id                |            1 | afl_rev_id    | A         |           0 |     NULL | NULL   | YES  | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_wiki_timestamp        |            1 | afl_wiki      | A         |           0 |     NULL | NULL   | YES  | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_wiki_timestamp        |            2 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_var_dump_timestamp    |            1 | afl_var_dump  | A         |           0 |        4 | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_var_dump_timestamp    |            2 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_ip_hex_timestamp      |            1 | afl_ip_hex    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
| abuse_filter_log |          1 | afl_ip_hex_timestamp      |            2 | afl_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | NO      |
+------------------+------------+---------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+