Recentchanges table

Материал из свободной русской энциклопедии «Традиция»
Перейти к навигации Перейти к поиску

Шаблон:Database layout Шаблон:MW 1.1

Эта таблица содержит информацию о последних изменнениях на вики. Глубина хранения информации определяется переменной $wgRCMaxAge. Содержимое этой таблицы используется при генерации следующих страниц: recent changes page, related changes page, watchlists, and the list of new pages. Так же она содержит такую информацию как IP-адреса авторов правок.

Поля[править | править код]

rc_id[править | править код]

MediaWiki version: 1.5 and after

Первичный ключ. (Начиная с версии MediaWiki 1.5)

rc_timestamp[править | править код]

Время внесения правки (timestamp).

rc_cur_time[править | править код]

Оставлено для обратной совместимости. Английский вариант документации туманно намекает, что иногда используется, но не говорит, конкретно где и зачем.


rc_user[править | править код]

Внешний ключ к user_id в User table. Выставляется в 0 при анонимных правках, скриптами инициализации и в некоторых случаях - при массовом импорте..

rc_user_text[править | править код]

Текстовое поле - имя того, осуществил правку или IP-адрес, если правка была анонимной.

rc_namespace[править | править код]

Номер пространства имён модифицированной страницы.

If this row describes a logged action, this field has a value of -1 (NS_SPECIAL), as it records an entry for a Special:Log subpage. This is the only place in which Special: pages are directly recorded in database namespace/title pairs at present.

rc_title[править | править код]

Имя страницы без префикса пространства имён.

rc_comment[править | править код]

This field holds an editor's edit summary (editor's comment on revision). This text is shown in the recent changes, related changes, watchlists, and, in the case of page creation, the list of new pages. (The revision table contains a copy used for the history and user contributions pages.) It is rendered in a subset of wiki markup.

rc_minor[править | править код]

Records whether the user marked the 'minor edit' checkbox. If the value for this field is 1, then the edit was declared as 'minor'; it is 0 otherwise. Many automated edits are marked as minor.

rc_bot[править | править код]

Records whether the edit was made by a 'bot account'. If the value for this field is 1, then the edit was made by a 'bot'; it is 0 otherwise. Users cannot designate their edits as bot edits individually; MediaWiki fills this column's value automatically.

rc_new[править | править код]

If the value for this field is 1, then this edit created a page; it is 0 otherwise.

rc_cur_id[править | править код]

This field links to the page_id key in the page table, which stores the metadata of the page.

rc_this_oldid[править | править код]

Links to the old_id key of the new page content (after the edit concerned) in the text table.

rc_last_oldid[править | править код]

Links to old_id of the revision prior to this edit, which included the previous content of the page.

rc_type[править | править код]

Шаблон:MW 1.2

Probably incomplete

This field stores the type of modification that was made to a page:

  • 0 - edit of existing page
  • 1 - new page
  • 3 - log action (introduced in MediaWiki 1.2)

rc_moved_to_ns[править | править код]

Шаблон:MW 1.2 This field stored the namespace of a page whenever it was moved. As of MediaWiki 1.8, it remains on the table for backwards compatibility only, and always has the value 0.

rc_moved_to_title[править | править код]

Шаблон:MW 1.2 This field stored the new page title of a page whenever it was moved. As of MediaWiki 1.8, it remains on the table for backwards compatibility only, and is always a null string.

rc_patrolled[править | править код]

Шаблон:MW 1.4 If the Recent Changes Patrol option ($wgUseRCPatrol) is enabled, users may mark edits as having been reviewed to remove a warning flag on the RC list. A value of 1 indicates the page has been reviewed. (Introduced in MediaWiki 1.4)

rc_ip[править | править код]

Шаблон:MW 1.3 This field stores the IP address of the user specified on rc_user if $wgPutIPinRC is enabled. This field is used to generate CheckUser reports, as this information is not stored anywhere else on MediaWiki's database architecture. (Introduced in MediaWiki 1.3)

rc_old_len[править | править код]

MediaWiki version: 1.9 and after

This field stores the size, in bytes, of previous revision's text. This field is used to generate the added and removed characters feature in recent changes, related changes and watchlists.

rc_new_len[править | править код]

MediaWiki version: 1.9 and after

This field stores the size, in bytes, of the current revision's text. This field is used to generate the added and removed characters feature in recent changes, related changes and watchlists.

rc_deleted[править | править код]

MediaWiki version: 1.10 and after

This field stores a value for this particular revision's visibility within the wiki. It was created to accommodate upcoming revisions to the deletion system. The field is analogous to rev_deleted.

rc_log_id[править | править код]

MediaWiki version: 1.10 and after

This field is a foreign key to the logging table, which links to log_id if this row corresponds to a log entry. The field was introduced in MediaWiki 1.10.

rc_log_type[править | править код]

MediaWiki version: 1.10 and after

If a log action is referenced in this row, this field stores the type of log action that was performed, and which is referenced in this row. Typical values are block, delete, import, makebot, move, newusers, protect, renameuser, rights, upload. This field is comparable to log_type.

rc_log_action[править | править код]

MediaWiki version: 1.10 and after

If a log action is referenced in this row, this field stores the type of log action that was performed, and which is referenced in this row. This field is comparable to log_action.

rc_params[править | править код]

MediaWiki version: 1.10 and after

This field will be a mirror of log_params, following the log_params text rewrite. Introduced in MediaWiki 1.10.

Schema summary[править | править код]

MediaWiki version: 1.10

DESCRIBE recentchanges in MediaWiki 1.10 gives the following:

mysql> describe mw_recentchanges;
+-------------------+---------------------+------+-----+---------+----------------+
| Field             | Type                | Null | Key | Default | Extra          |
+-------------------+---------------------+------+-----+---------+----------------+
| rc_id             | int(8)              | NO   | PRI | NULL    | auto_increment |
| rc_timestamp      | varchar(14)         | NO   | MUL | NULL    |                |
| rc_cur_time       | varchar(14)         | NO   |     | NULL    |                |
| rc_user           | int(10) unsigned    | NO   |     | 0       |                |
| rc_user_text      | varchar(255)        | NO   | MUL | NULL    |                |
| rc_namespace      | int(11)             | NO   | MUL | 0       |                |
| rc_title          | varchar(255)        | NO   |     | NULL    |                |
| rc_comment        | varchar(255)        | NO   |     | NULL    |                |
| rc_minor          | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_bot            | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_new            | tinyint(3) unsigned | NO   | MUL | 0       |                |
| rc_cur_id         | int(10) unsigned    | NO   | MUL | 0       |                |
| rc_this_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_last_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_type           | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_ns    | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_title | varchar(255)        | NO   |     | NULL    |                |
| rc_patrolled      | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_ip             | char(15)            | NO   | MUL | NULL    |                |
| rc_old_len        | int(10)             | YES  |     | NULL    |                |
| rc_new_len        | int(10)             | YES  |     | NULL    |                |
| rc_deleted        | tinyint(1) unsigned | NO   |     | 0       |                |
| rc_logid          | int(10) unsigned    | NO   |     | 0       |                |
| rc_log_type       | varchar(255)        | YES  |     | NULL    |                |
| rc_params         | blob                | NO   |     | NULL    |                |
+-------------------+---------------------+------+-----+---------+----------------+
25 rows in set (0.24 sec)


MediaWiki version: 1.9

DESCRIBE recentchanges in MediaWiki 1.9 gives the following:

mysql> describe mw_recentchanges;
+-------------------+---------------------+------+-----+---------+----------------+
| Field             | Type                | Null | Key | Default | Extra          |
+-------------------+---------------------+------+-----+---------+----------------+
| rc_id             | int(8)              | NO   | PRI | NULL    | auto_increment |
| rc_timestamp      | varchar(14)         | NO   | MUL | NULL    |                |
| rc_cur_time       | varchar(14)         | NO   |     | NULL    |                |
| rc_user           | int(10) unsigned    | NO   |     | 0       |                |
| rc_user_text      | varchar(255)        | NO   | MUL | NULL    |                |
| rc_namespace      | int(11)             | NO   | MUL | 0       |                |
| rc_title          | varchar(255)        | NO   |     | NULL    |                |
| rc_comment        | varchar(255)        | NO   |     | NULL    |                |
| rc_minor          | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_bot            | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_new            | tinyint(3) unsigned | NO   | MUL | 0       |                |
| rc_cur_id         | int(10) unsigned    | NO   | MUL | 0       |                |
| rc_this_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_last_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_type           | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_ns    | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_title | varchar(255)        | NO   |     | NULL    |                |
| rc_patrolled      | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_ip             | char(15)            | NO   | MUL | NULL    |                |
| rc_old_len        | int(10)             | YES  |     | NULL    |                |
| rc_new_len        | int(10)             | YES  |     | NULL    |                |
+-------------------+---------------------+------+-----+---------+----------------+
21 rows in set


MediaWiki version: 1.8
MediaWiki version: 1.7
MediaWiki version: 1.6
MediaWiki version: 1.5

DESCRIBE recentchanges in MediaWiki 1.5 through 1.8 gives the following:

+-------------------+---------------------+------+-----+---------+----------------+
| Field             | Type                | Null | Key | Default | Extra          |
+-------------------+---------------------+------+-----+---------+----------------+
| rc_id             | int(8)              | NO   | PRI | NULL    | auto_increment |
| rc_timestamp      | varchar(14)         | NO   | MUL |         |                |
| rc_cur_time       | varchar(14)         | NO   |     |         |                |
| rc_user           | int(10) unsigned    | NO   |     | 0       |                |
| rc_user_text      | varchar(255)        | NO   |     |         |                |
| rc_namespace      | int(11)             | NO   | MUL | 0       |                |
| rc_title          | varchar(255)        | NO   |     |         |                |
| rc_comment        | varchar(255)        | NO   |     |         |                |
| rc_minor          | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_bot            | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_new            | tinyint(3) unsigned | NO   | MUL | 0       |                |
| rc_cur_id         | int(10) unsigned    | NO   | MUL | 0       |                |
| rc_this_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_last_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_type           | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_ns    | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_title | varchar(255)        | NO   |     |         |                |
| rc_patrolled      | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_ip             | char(15)            | NO   | MUL |         |                |
+-------------------+---------------------+------+-----+---------+----------------+
19 rows in set

Шаблон:MW 1.4 DESCRIBE recentchanges in MediaWiki 1.4 gives the following:

+-------------------+---------------------+------+-----+---------+----------------+
| Field             | Type                | Null | Key | Default | Extra          |
+-------------------+---------------------+------+-----+---------+----------------+
| rc_timestamp      | varchar(14)         | NO   | MUL |         |                |
| rc_cur_time       | varchar(14)         | NO   |     |         |                |
| rc_user           | int(10) unsigned    | NO   |     | 0       |                |
| rc_user_text      | varchar(255)        | NO   |     |         |                |
| rc_namespace      | int(11)             | NO   | MUL | 0       |                |
| rc_title          | varchar(255)        | NO   |     |         |                |
| rc_comment        | varchar(255)        | NO   |     |         |                |
| rc_minor          | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_bot            | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_new            | tinyint(3) unsigned | NO   | MUL | 0       |                |
| rc_cur_id         | int(10) unsigned    | NO   | MUL | 0       |                |
| rc_this_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_last_oldid     | int(10) unsigned    | NO   |     | 0       |                |
| rc_type           | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_ns    | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_moved_to_title | varchar(255)        | NO   |     |         |                |
| rc_patrolled      | tinyint(3) unsigned | NO   |     | 0       |                |
| rc_ip             | char(15)            | NO   | MUL |         |                |
+-------------------+---------------------+------+-----+---------+----------------+
18 rows in set

Шаблон:MW 1.3 DESCRIBE recentchanges in MediaWiki 1.3 gives the following:

+-------------------+---------------------+------+-----+---------+-------+
| Field             | Type                | Null | Key | Default | Extra |
+-------------------+---------------------+------+-----+---------+-------+
| rc_timestamp      | varchar(14) binary  |      | MUL |         |       |
| rc_cur_time       | varchar(14) binary  |      |     |         |       | 
| rc_user           | int(10) unsigned    |      |     | 0       |       |
| rc_user_text      | varchar(255) binary |      |     |         |       |
| rc_namespace      | tinyint(3) unsigned |      | MUL | 0       |       |
| rc_title          | varchar(255) binary |      |     |         |       |
| rc_comment        | varchar(255) binary |      |     |         |       |
| rc_minor          | tinyint(3) unsigned |      |     | 0       |       |
| rc_bot            | tinyint(3) unsigned |      |     | 0       |       |
| rc_new            | tinyint(3) unsigned |      | MUL | 0       |       |
| rc_cur_id         | int(10) unsigned    |      | MUL | 0       |       |
| rc_this_oldid     | int(10) unsigned    |      |     | 0       |       |
| rc_last_oldid     | int(10) unsigned    |      |     | 0       |       |
| rc_type           | tinyint(3) unsigned |      |     | 0       |       |
| rc_moved_to_ns    | tinyint(3) unsigned |      |     | 0       |       |
| rc_moved_to_title | varchar(255) binary |      |     |         |       |
| rc_ip             | varchar(15)         |      | MUL |         |       |
+-------------------+---------------------+------+-----+---------+-------+
17 rows in set

Шаблон:MW 1.2 DESCRIBE recentchanges in MediaWiki 1.2 gives the following:

+-------------------+---------------------+------+-----+---------+-------+
| Field             | Type                | Null | Key | Default | Extra |
+-------------------+---------------------+------+-----+---------+-------+
| rc_timestamp      | varchar(14) binary  |      | MUL |         |       |
| rc_cur_time       | varchar(14) binary  |      |     |         |       | 
| rc_user           | int(10) unsigned    |      |     | 0       |       |
| rc_user_text      | varchar(255) binary |      |     |         |       |
| rc_namespace      | tinyint(3) unsigned |      | MUL | 0       |       |
| rc_title          | varchar(255) binary |      |     |         |       |
| rc_comment        | varchar(255) binary |      |     |         |       |
| rc_minor          | tinyint(3) unsigned |      |     | 0       |       |
| rc_bot            | tinyint(3) unsigned |      |     | 0       |       |
| rc_new            | tinyint(3) unsigned |      | MUL | 0       |       |
| rc_cur_id         | int(10) unsigned    |      | MUL | 0       |       |
| rc_this_oldid     | int(10) unsigned    |      |     | 0       |       |
| rc_last_oldid     | int(10) unsigned    |      |     | 0       |       |
| rc_type           | tinyint(3) unsigned |      |     | 0       |       |
| rc_moved_to_ns    | tinyint(3) unsigned |      |     | 0       |       |
| rc_moved_to_title | varchar(255) binary |      |     |         |       |
+-------------------+---------------------+------+-----+---------+-------+
16 rows in set

Шаблон:MW 1.1 DESCRIBE recentchanges in MediaWiki 1.1 gives the following:

+-------------------+---------------------+------+-----+---------+-------+
| Field             | Type                | Null | Key | Default | Extra |
+-------------------+---------------------+------+-----+---------+-------+
| rc_timestamp      | varchar(14) binary  |      | MUL |         |       |
| rc_cur_time       | varchar(14) binary  |      |     |         |       | 
| rc_user           | int(10) unsigned    |      |     | 0       |       |
| rc_user_text      | varchar(255) binary |      |     |         |       |
| rc_namespace      | tinyint(3) unsigned |      | MUL | 0       |       |
| rc_title          | varchar(255) binary |      |     |         |       |
| rc_comment        | varchar(255) binary |      |     |         |       |
| rc_minor          | tinyint(3) unsigned |      |     | 0       |       |
| rc_bot            | tinyint(3) unsigned |      |     | 0       |       |
| rc_new            | tinyint(3) unsigned |      | MUL | 0       |       |
| rc_cur_id         | int(10) unsigned    |      | MUL | 0       |       |
| rc_this_oldid     | int(10) unsigned    |      |     | 0       |       |
| rc_last_oldid     | int(10) unsigned    |      |     | 0       |       |
+-------------------+---------------------+------+-----+---------+-------+
13 rows in set


Ссылки[править | править код]

Оригинал статьи