手册:bot_passwords表

This page is a translated version of the page Manual:Bot passwords table and the translation is 29% complete.
手册:索引 MediaWiki数据库布局 bot_passwords表
MediaWiki版本:
1.27

bot_passwords表存储机器人密码

On wiki farms using some kind of single sign-on, wikis can use a single shared table; thus, the local wiki's bot_password table is not necessarily the one where the passwords are stored. 参见$wgBotPasswordsDatabase $wgBotPasswordsCluster

字段

bp_user

Central ID of the user. On a default installation this is a foreign key to user.user_id .

bp_app_id

App ID, used to differentiate multiple applications using the same account; applications using bot login need to pass <real username>@<app id> as username.

bp_password

Password hash (like user.user_password ).

bp_token

Token for remembering / invalidating the session (like user.user_token ).

bp_restrictions

JSON blob for MWRestrictions.

bp_grants

Grants allowed to the account when authenticated with this bot-password.

Schema summary

MediaWiki版本:
1.30

DESCRIBE bot_passwords;

+-----------------+------------------+------+-----+----------------------------------+-------+
| Field           | Type             | Null | Key | Default                          | Extra |
+-----------------+------------------+------+-----+----------------------------------+-------+
| bp_user         | int(10) unsigned | NO   | PRI | NULL                             |       |
| bp_app_id       | varbinary(32)    | NO   | PRI | NULL                             |       |
| bp_password     | tinyblob         | NO   |     | NULL                             |       |
| bp_token        | binary(32)       | NO   |     |                                  |       |
| bp_restrictions | blob             | NO   |     | NULL                             |       |
| bp_grants       | blob             | NO   |     | NULL                             |       |
+-----------------+------------------+------+-----+----------------------------------+-------+
MediaWiki版本:
1.27 – 1.29

DESCRIBE bot_passwords;

+-----------------+---------------+------+-----+----------------------------------+-------+
| Field           | Type          | Null | Key | Default                          | Extra |
+-----------------+---------------+------+-----+----------------------------------+-------+
| bp_user         | int(11)       | NO   | PRI | NULL                             |       |
| bp_app_id       | varbinary(32) | NO   | PRI | NULL                             |       |
| bp_password     | tinyblob      | NO   |     | NULL                             |       |
| bp_token        | binary(32)    | NO   |     |                                  |       |
| bp_restrictions | blob          | NO   |     | NULL                             |       |
| bp_grants       | blob          | NO   |     | NULL                             |       |
+-----------------+---------------+------+-----+----------------------------------+-------+

Indexes

MediaWiki版本:
1.27

SHOW INDEX IN bot_passwords;

+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table         | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| bot_passwords |          0 | PRIMARY  |            1 | bp_user     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| bot_passwords |          0 | PRIMARY  |            2 | bp_app_id   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+