Recentchanges table
From MediaWiki.org
| ↑ Manual:Contents | MediaWiki database layout | Recentchanges table |
| MediaWiki version: | 1.1 | and after |
The recentchanges table contains information about the latest modifications done to the wiki (not older than $wgRCMaxAge; see also below). The contents of this table are used to generate the recent changes pages, related changes pages, watchlists, and the list of new pages, and contain information such as editors' IP addresses not found on other tables.
[edit] Fields
[edit] rc_id
| MediaWiki version: | 1.5 | and after |
This is the primary key for the table. (Introduced in MediaWiki 1.5)
[edit] rc_timestamp
Holds the timestamp of the edit.
[edit] rc_cur_time
Held for backwards compatibility, although still used in a few places.
[edit] rc_user
This is equal to the user_id of the user who made this edit. The value for this field is 0 for anonymous edits, initialization scripts, and for some mass imports.
[edit] rc_user_text
This fields holds the text of the editor's username, or the IP address of the editor if the revision was done by an unregistered user.
[edit] rc_namespace
The namespace number of the page that was modified.
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.
[edit] rc_title
The name of the page that was modified, with the namespace stripped. This field stores information in text form.
[edit] 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.
[edit] 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.
[edit] 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.
[edit] rc_new
If the value for this field is 1, then this edit created a page; it is 0 otherwise.
[edit] rc_cur_id
This field links to the page_id key in the page table, which stores the metadata of the page.
[edit] rc_this_oldid
Links to the rev_id key of the new page revision (after the edit occurs) in the revision table.
[edit] rc_last_oldid
Links to rev_id of the revision prior to this edit, which included the previous content of the page.
[edit] rc_type
| MediaWiki version: | 1.2 | and after |
- 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)
[edit] rc_moved_to_ns
| MediaWiki version: | 1.2 | and after |
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.
[edit] rc_moved_to_title
| MediaWiki version: | 1.2 | and after |
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.
[edit] rc_patrolled
| MediaWiki version: | 1.4 | and after |
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)
[edit] rc_ip
| MediaWiki version: | 1.3 | and after |
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)
[edit] 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.
[edit] 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.
[edit] 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.
[edit] 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.
[edit] 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.
[edit] 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.
[edit] 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.
[edit] Schema summary
| MediaWiki version: | 1.12 |
DESCRIBE recentchanges: in MediaWiki 1.12 gives the following:
+-------------------+---------------------+------+-----+---------+----------------+ | 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(11) | YES | | NULL | | | rc_new_len | int(11) | YES | | NULL | | | rc_deleted | tinyint(1) unsigned | NO | | 0 | | | rc_logid | int(10) unsigned | NO | | 0 | | | rc_log_type | varchar(255) | YES | | NULL | | | rc_log_action | varchar(255) | YES | | NULL | | | rc_params | blob | YES | | NULL | | +-------------------+---------------------+------+-----+---------+----------------+
| MediaWiki version: | 1.11 |
DESCRIBE recentchanges: in MediaWiki 1.11 gives the following:
+-------------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------+---------------------+------+-----+---------+----------------+ | rc_id | int(11) | NO | PRI | NULL | auto_increment | | rc_timestamp | varbinary(14) | NO | MUL | NULL | | | rc_cur_time | varbinary(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 | varbinary(40) | NO | MUL | NULL | | | rc_old_len | int(11) | YES | | NULL | | | rc_new_len | int(11) | YES | | NULL | | | rc_deleted | tinyint(3) unsigned | NO | | 0 | | | rc_logid | int(10) unsigned | NO | | 0 | | | rc_log_type | varchar(255) | YES | | NULL | | | rc_log_action | varchar(255) | YES | | NULL | | | rc_params | blob | YES | | NULL | | +-------------------+---------------------+------+-----+---------+----------------+
| MediaWiki version: | 1.10 |
DESCRIBE recentchanges: in MediaWiki 1.10 gives the following:
+-------------------+---------------------+------+-----+---------+----------------+ | 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 | | +-------------------+---------------------+------+-----+---------+----------------+
| MediaWiki version: | 1.9 |
DESCRIBE recentchanges in MediaWiki 1.9 gives the following:
+-------------------+---------------------+------+-----+---------+----------------+ | 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 | | +-------------------+---------------------+------+-----+---------+----------------+
| 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 | | | +-------------------+---------------------+------+-----+---------+----------------+
| MediaWiki version: | 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 | | | +-------------------+---------------------+------+-----+---------+----------------+
| MediaWiki version: | 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 | | | +-------------------+---------------------+------+-----+---------+-------+
| MediaWiki version: | 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 | | | | | +-------------------+---------------------+------+-----+---------+-------+
| MediaWiki version: | 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 | | +-------------------+---------------------+------+-----+---------+-------+

