Jump to content

手册:user_properties表

From mediawiki.org
This page is a translated version of the page Manual:User properties table and the translation is 91% complete.
Outdated translations are marked like this.
手册:索引 MediaWiki数据库布局 user_properties表
MediaWiki版本:
1.16

user_properties表存储用户参数设置 。 它取代了旧的user.user_options 大型数据对象。 只存储非默认设置,因此对默认设置的更改现在会反映给没有保存替代首选项的所有人,而不仅仅是新帐户。

字段

up_user

指向user 表的user_id字段的外键。

up_property

用户首选项,请参阅手册:$wgDefaultUserOptions 。 例子: gender, watchcreations

up_value

参数设置值。

架构摘要

MediaWiki版本:
1.30

DESCRIBE user_properties;

+-------------+------------------+------+-----+---------+-------+
| Field       | Type             | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------+-------+
| up_user     | int(10) unsigned | NO   | PRI | NULL    |       |
| up_property | varbinary(255)   | NO   | PRI | NULL    |       |
| up_value    | blob             | YES  |     | NULL    |       |
+-------------+------------------+------+-----+---------+-------+
MediaWiki版本:
1.18 – 1.29

DESCRIBE user_properties;

+-------------+----------------+------+-----+---------+-------+
| Field       | Type           | Null | Key | Default | Extra |
+-------------+----------------+------+-----+---------+-------+
| up_user     | int(11)        | NO   | PRI | NULL    |       |
| up_property | varbinary(255) | NO   | PRI | NULL    |       |
| up_value    | blob           | YES  |     | NULL    |       |
+-------------+----------------+------+-----+---------+-------+
MediaWiki版本:
1.16 – 1.17

DESCRIBE user_properties;

+-------------+---------------+------+-----+---------+----------------+
| Field       | Type          | Null | Key | Default | Extra          |
+-------------+---------------+------+-----+---------+----------------+
| up_user     | int(11)       | NO   | PRI | NULL    |                |
| up_property | varbinary(32) | NO   | PRI | NULL    |                |
| up_value    | blob          | YES  |     | NULL    |                |
+-------------+---------------+------+-----+---------+----------------+

索引

MediaWiki版本:
1.36

SHOW INDEX IN user_properties;

+-----------------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table           | Non_unique | Key_name    | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-----------------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| user_properties |          0 | PRIMARY     |            1 | up_user     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| user_properties |          0 | PRIMARY     |            2 | up_property | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| user_properties |          1 | up_property |            1 | up_property | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+-----------------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+