"comment":"The \"actor\" table associates user names or IP addresses with integers for the benefit of other tables that need to refer to either logged-in or logged-out users. If something can only ever be done by logged-in users, it can refer to the user table directly.",
"comment":"Stores the groups the user has once belonged to. The user may still belong to these groups (check user_groups). Autopromotion of users to groups from which they were removed can be restricted by using wgAutopromoteOnce instead of wgAutopromote.",
"comment":"Edits, blocks, and other actions typically have a textual comment describing the action. They are stored here to reduce the size of the main tables, and to allow for deduplication. Deduplication is currently best-effort to avoid locking on inserts that would be required for strict deduplication. There MAY be multiple rows with the same comment_text and comment_data.",
"comment":"Hash of comment_text and comment_data, for deduplication",
"type":"integer",
"options":{"notnull":true}
},
{
"name":"comment_text",
"comment":"Text comment summarizing the change. This text is shown in the history and other changes lists, rendered in a subset of wiki markup by Linker::formatComment(). Size limits are enforced at the application level, and should take care to crop UTF-8 strings appropriately.",
"type":"blob",
"options":{"length":65535,"notnull":true}
},
{
"name":"comment_data",
"comment":"JSON data, intended for localizing auto-generated comments. This holds structured data that is intended to be used to provide localized versions of automatically-generated comments. When not empty, comment_text should be the generated comment localized using the wiki's content language.",
"comment":"Slots represent an n:m relation between revisions and content objects. A content object can have a specific \"role\" in one or more revisions. Each revision can have multiple content objects, each having a different role.",
"columns":[
{
"name":"slot_revision_id",
"comment":"reference to rev_id or ar_rev_id",
"type":"bigint",
"options":{"unsigned":true,"notnull":true}
},
{
"name":"slot_role_id",
"comment":"reference to role_id",
"type":"smallint",
"options":{"unsigned":true,"notnull":true}
},
{
"name":"slot_content_id",
"comment":"reference to content_id",
"type":"bigint",
"options":{"unsigned":true,"notnull":true}
},
{
"name":"slot_origin",
"comment":"The revision ID of the revision that originated the slot's content. To find revisions that changed slots, look for slot_origin = slot_revision_id. TODO: Is that actually true? Rollback seems to violate it by setting slot_origin to an older rev_id. Undeletions could result in the same situation.",
"comment":"User preferences and perhaps other fun stuff. :) Replaces the old user.user_options blob, with a couple nice properties: 1) We only store non-default settings, so changes to the defaults are now reflected for everybody, not just new accounts. 2) We can more easily do bulk lookups, statistics, or modifications of saved options since it's a sane table structure.",
"columns":[
{
"name":"up_user",
"comment":"Foreign key to user.user_id",
"type":"integer",
"options":{"unsigned":true,"notnull":true}
},
{
"name":"up_property",
"comment":"Name of the option being saved. This is indexed for bulk lookup.",
"comment":"The content table represents content objects. It's primary purpose is to provide the necessary meta-data for loading and interpreting a serialized data blob to create a content object.",
"comment":"Nominal size of the content object (not necessarily of the serialized blob)",
"type":"integer",
"options":{"notnull":true,"unsigned":true}
},
{
"name":"content_sha1",
"comment":"Nominal hash of the content object (not necessarily of the serialized blob)",
"type":"binary",
"options":{"notnull":true,"length":32}
},
{
"name":"content_model",
"comment":"reference to model_id. Note the content format isn't specified; it should be assumed to be in the default format for the model unless auto-detected otherwise.",
"comment":"Table caching which local files a module depends on that aren't registered directly, used for fast retrieval of file dependency. Currently only used for tracking images that CSS depends on",
"columns":[
{
"name":"md_module",
"comment":"Module name",
"type":"binary",
"options":{"notnull":true,"length":255}
},
{
"name":"md_skin",
"comment":"Module context vary (includes skin and language; called \"md_skin\" for legacy reasons)",
"comment":"For each redirect, this table contains exactly one row defining its target.\nRedirect targets are key to page_namespace/page_title of the target page.\nThe target page may or may not exist, and due to renames\nand deletions may refer to different page records as time\ngoes by.",
"columns":[
{
"name":"rd_from",
"comment":"Key to the page_id of the redirect page",
"comment":"Track page-to-page hyperlinks within the wiki. The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.",
"columns":[
{
"name":"pl_from",
"comment":"Key to the page_id of the page containing the link.",
"comment":"Track template inclusions. The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.",
"columns":[
{
"name":"tl_from",
"comment":"Key to the page_id of the page containing the link.",
"comment":"Track links to images *used inline* We don't distinguish live from broken links here, so they do not need to be changed on upload/removal.",
"columns":[
{
"name":"il_from",
"comment":"Key to page_id of the page containing the image / media link.",
"comment":"Track all existing categories. Something is a category if 1) it has an entry somewhere in categorylinks, or 2) it has a description page. Categories might not have corresponding pages, so they need to be tracked separately. The numbers of member pages (including categories and media), subcategories, and Image: namespace members, respectively are included in this table too. These are signed to make underflow more obvious. We make the first number include the second two for better sorting: subtracting for display is easy, adding for ordering is not.",
"comment":"Name of the category, in the same form as page_title (with underscores). If there is a category page corresponding to this category, by definition, it has this name (in the Category namespace).",
"comment":"User permissions have been broken out to a separate table; this allows sites with a shared user table to have different permissions assigned to a user in each project. This table replaces the old user_rights field which used a comma-separated blob.",
"comment":"Group names are short symbolic string keys. The set of group names is open-ended, though in practice only some predefined ones are likely to be used. At runtime $wgGroupPermissions will associate group keys with particular permissions. A user will have the combined permissions of any group they're explicitly in, plus the implicit '*' and 'user' groups.",
"comment":"Timestamp used to send notification e-mails and show 'updated since last visit' markers. Set to NULL when the user visits the latest revision of the page, which means that they should be sent an e-mail on the next change.",
"comment":"Global identifier for the site, ie 'enwiktionary'",
"options":{"notnull":true,"length":64}
},
{
"name":"site_type",
"type":"binary",
"comment":"Type of the site, ie 'mediawiki'",
"options":{"notnull":true,"length":32}
},
{
"name":"site_group",
"type":"binary",
"comment":"Group of the site, ie 'wikipedia'",
"options":{"notnull":true,"length":32}
},
{
"name":"site_source",
"type":"binary",
"comment":"Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'",
"options":{"notnull":true,"length":32}
},
{
"name":"site_language",
"type":"binary",
"comment":"Language code of the sites primary language.",
"options":{"notnull":true,"length":35}
},
{
"name":"site_protocol",
"type":"binary",
"comment":"Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.",
"options":{"notnull":true,"length":32}
},
{
"name":"site_domain",
"type":"string",
"comment":"Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build from type specific data in site_data.",
"options":{"notnull":true,"length":255}
},
{
"name":"site_data",
"type":"blob",
"comment":"Type dependent site data.",
"options":{"notnull":true,"length":65530}
},
{
"name":"site_forward",
"type":"mwtinyint",
"comment":"If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.",
"options":{"notnull":true,"length":1}
},
{
"name":"site_config",
"type":"blob",
"comment":"Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.",
"comment":"The interwiki prefix, (e.g. \"Meatball\", or the language prefix \"de\")",
"options":{"length":32,"notnull":true}
},
{
"name":"iw_url",
"type":"blob",
"comment":"The URL of the wiki, with \"$1\" as a placeholder for an article name. Any spaces in the name will be transformed to underscores before insertion.",
"options":{"notnull":true,"length":65530}
},
{
"name":"iw_api",
"type":"blob",
"comment":"The URL of the file api.php",
"options":{"notnull":true,"length":65530}
},
{
"name":"iw_wikiid",
"type":"string",
"comment":"The name of the database (for a connection to be established with LBFactory::getMainLB( 'wikiid' ))",
"options":{"notnull":true,"length":64}
},
{
"name":"iw_local",
"type":"mwtinyint",
"comment":"A boolean value indicating whether the wiki is in this project (used, for example, to detect redirect loops)",
"options":{"notnull":true,"length":1}
},
{
"name":"iw_trans",
"type":"mwtinyint",
"comment":"Boolean value indicating whether interwiki transclusions are allowed.",
"comment":"In the case of HTTP URLs, this is the URL with any username or password removed, and with the labels in the hostname reversed and converted to lower case which will allow faster searching for all pages with WHERE clause. Note: If PHP's intl extension is enabled/disabled, maintenance/refreshExternallinksIndex.php needs to be run to refresh this field",
"options":{"length":65530,"notnull":true}
},
{
"name":"el_index_60",
"type":"binary",
"comment":"'el_index' truncated to 60 bytes to allow for sortable queries that aren't supported by a partial index",
"comment":"Every time an edit by a logged out user is saved, a row is created in ip_changes. This stores the IP as a hex representation so that we can more easily find edits within an IP range.",
"columns":[
{
"name":"ipc_rev_id",
"comment":"Foreign key to the revision table, also serves as the unique primary key",
"comment":"Hex representation of the IP address, as returned by Wikimedia\\IPUtils::toHex() For IPv4 it will resemble: ABCD1234 For IPv6: v6-ABCD1234000000000000000000000000 BETWEEN is then used to identify revisions within a given range",
"comment":"Temporary table to avoid blocking on an alter of revision. On large wikis like the English Wikipedia, altering the revision table is a months-long process. This table is being created to avoid such an alter, and will be merged back into revision in the future",
"comment":"Temporary table to avoid blocking on an alter of revision. On large wikis like the English Wikipedia, altering the revision table is a months-long process. This table is being created to avoid such an alter, and will be merged back into revision in the future",
"comment":"A binary string obtained by applying a sortkey generation algorithm (Collation::getSortKey()) to page_title, or cl_sortkey_prefix . \"\\n\" page_title if cl_sortkey_prefix is nonempty.",
"comment":"A prefix for the raw sortkey manually specified by the user, either via [[Category:Foo|prefix]] or {{defaultsort:prefix}}. If nonempty, it's concatenated with a line break followed by the page title before the sortkey conversion algorithm is run. We store this so that we can update collations without reparsing all pages. Note: If you change the length of this field, you also need to change code in LinksUpdate.php. See T27254.",
"comment":"Stores $wgCategoryCollation at the time cl_sortkey was generated. This can be used to install new collation versions, tracking which rows are not yet updated. '' means no collation, this is a legacy row that needs to be updated by updateCollation.php. In the future, it might be possible to specify different collations per category.",
"comment":"Stores whether cl_from is a category, file, or other page, so we can paginate the three categories separately. This only has to be updated when moving pages into or out of the category namespace, since file pages cannot be moved to other namespaces, nor can non-files be moved into the file namespace.",
"type":"mwenum",
"options":{"notnull":true,"default":"page",
"CustomSchemaOptions":{
"enum_values":["page","subcat","file"]
}
}
}
],
"indexes":[
{
"name":"cl_sortkey",
"comment":"We always sort within a given category, and within a given type. FIXME: Formerly this index didn't cover cl_type (since that didn't exist), so old callers won't be using an index: fix this?",
"comment":"Original base filename; key to image.img_name, page.page_title, etc",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":255
}
},
{
"name":"fa_archive_name",
"comment":"Filename of archived file, if an old revision",
"type":"binary",
"options":{
"notnull":false,
"default":"",
"length":255
}
},
{
"name":"fa_storage_group",
"comment":"Which storage bin (directory tree or object store) the file data is stored in. Should be 'deleted' for files that have been deleted; any other bin is not yet in use.",
"type":"binary",
"options":{
"notnull":false,
"length":16
}
},
{
"name":"fa_storage_key",
"comment":"SHA-1 of the file contents plus extension, used as a key for storage. eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg. If NULL, the file was missing at deletion time or has been purged from the archival storage.",
"comment":"Holds text of individual page revisions. Field names are a holdover from the 'old' revisions table in MediaWiki 1.4 and earlier: an upgrade will transform that table into the 'text' table to minimize unnecessary churning and downtime. If upgrading, the other fields will be left unused.",
"columns":[
{
"name":"old_id",
"comment":"Unique text storage key number. Note that the 'oldid' parameter used in URLs does *not* refer to this number anymore, but to rev_id. content.content_address refers to this column",
"type":"integer",
"options":{
"autoincrement":true,
"unsigned":true,
"notnull":true
}
},
{
"name":"old_text",
"comment":"Depending on the contents of the old_flags field, the text may be convenient plain text, or it may be funkily encoded.",
"type":"blob",
"options":{
"notnull":true,
"length":16777215
}
},
{
"name":"old_flags",
"comment":"Comma-separated list of flags:\n* gzip: text is compressed with PHP's gzdeflate() function.\n* utf-8: text was stored as UTF-8. If $wgLegacyEncoding option is on, rows *without* this flag will be converted to UTF-8 transparently at load time. Note that due to a bug in a maintenance script, this flag may have been stored as 'utf8' in some cases (T18841).\n* object: text field contained a serialized PHP object. The object either contains multiple versions compressed together to achieve a better compression ratio, or it refers to another row where the text can be found.\n* external: text was stored in an external location specified by old_text. Any additional flags apply to the data stored at that URL, not the URL itself. The 'object' flag is *not* set for URLs of the form 'DB://cluster/id/itemid', because the external storage system itself decompresses these.",
"comment":"Blocks against user accounts, IP addresses and IP ranges.",
"columns":[
{
"name":"ipb_id",
"comment":"Primary key, introduced for privacy.",
"type":"integer",
"options":{
"autoincrement":true,
"notnull":true
}
},
{
"name":"ipb_address",
"comment":"Blocked IP address in dotted-quad form or user name.",
"type":"blob",
"options":{
"notnull":true,
"length":255
}
},
{
"name":"ipb_user",
"comment":"Blocked user ID or 0 for IP blocks.",
"type":"integer",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"ipb_by_actor",
"comment":"Actor who made the block.",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"ipb_reason_id",
"comment":"Key to comment_id. Text comment made by blocker.",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"ipb_timestamp",
"comment":"Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically.",
"type":"mwtimestamp",
"options":{
"notnull":true
}
},
{
"name":"ipb_auto",
"comment":"Indicates that the IP address was banned because a banned user accessed a page through it. If this is 1, ipb_address will be hidden, and the block identified by block ID number.",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":0
}
},
{
"name":"ipb_anon_only",
"comment":"If set to 1, block applies only to logged-out users",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":0
}
},
{
"name":"ipb_create_account",
"comment":"Block prevents account creation from matching IP addresses",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":1
}
},
{
"name":"ipb_enable_autoblock",
"comment":"Block triggers autoblocks",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":1
}
},
{
"name":"ipb_expiry",
"comment":"Time at which the block will expire. May be \"infinity\"",
"type":"mwtimestamp",
"options":{
"notnull":true,
"CustomSchemaOptions":{
"allowInfinite":true
}
}
},
{
"name":"ipb_range_start",
"comment":"Start of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
"type":"blob",
"options":{
"notnull":true,
"length":255
}
},
{
"name":"ipb_range_end",
"comment":"End of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
"type":"blob",
"options":{
"notnull":true,
"length":255
}
},
{
"name":"ipb_deleted",
"comment":"Flag for entries hidden from users and Sysops",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":0
}
},
{
"name":"ipb_block_email",
"comment":"Block prevents user from accessing Special:Emailuser",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":0
}
},
{
"name":"ipb_allow_usertalk",
"comment":"Block allows user to edit their own talk page",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":0
}
},
{
"name":"ipb_parent_block_id",
"comment":"ID of the block that caused this block to exist. Autoblocks set this to the original block so that the original block being deleted also deletes the autoblocks",
"type":"integer",
"options":{
"notnull":false,
"default":null
}
},
{
"name":"ipb_sitewide",
"comment":"Block user from editing any page on the site (other than their own user talk page).",
"type":"mwtinyint",
"options":{
"notnull":true,
"length":1,
"default":1
}
}
],
"indexes":[
{
"name":"ipb_address_unique",
"comment":"Unique index to support \"user already blocked\" messages. Any new options which prevent collisions should be included",
"columns":[
"ipb_address",
"ipb_user",
"ipb_auto"
],
"unique":true,
"options":{"lengths":[255,null,null]}
},
{
"name":"ipb_user",
"comment":"For querying whether a logged-in user is blocked",
"columns":[
"ipb_user"
],
"unique":false
},
{
"name":"ipb_range",
"comment":"For querying whether an IP address is in any range",
"columns":[
"ipb_range_start",
"ipb_range_end"
],
"unique":false,
"options":{"lengths":[8,8]}
},
{
"name":"ipb_timestamp",
"comment":"Index for Special:BlockList",
"columns":[
"ipb_timestamp"
],
"unique":false
},
{
"name":"ipb_expiry",
"comment":"Index for table pruning",
"columns":[
"ipb_expiry"
],
"unique":false
},
{
"name":"ipb_parent_block_id",
"comment":"Index for removing autoblocks when a parent block is removed",
"comment":"major part of a MIME media type as defined by IANA see https://www.iana.org/assignments/media-types/ for \"chemical\" cf. http://dx.doi.org/10.1021/ci9803233 by the ACS",
"comment":"minor part of a MIME media type as defined by IANA the minor parts are not required to adhere to any standard but should be consistent throughout the database see https://www.iana.org/assignments/media-types/",
"type":"binary",
"options":{
"notnull":true,
"default":"unknown",
"length":100
}
},
{
"name":"img_description_id",
"comment":"Foreign key to comment table, which contains the description field as entered by the uploader. This is displayed in image upload history and logs.",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"img_actor",
"comment":"actor_id of the uploader.",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"img_timestamp",
"comment":"Time of the upload.",
"type":"mwtimestamp",
"options":{
"notnull":true,
"length":14
}
},
{
"name":"img_sha1",
"comment":"SHA-1 content hash in base-36",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":32
}
}
],
"indexes":[
{
"name":"img_actor_timestamp",
"comment":"Used by Special:Newimages and ApiQueryAllImages",
"columns":[
"img_actor",
"img_timestamp"
],
"unique":false
},
{
"name":"img_size",
"comment":"Used by Special:ListFiles for sort-by-size",
"columns":[
"img_size"
],
"unique":false
},
{
"name":"img_timestamp",
"comment":"Used by Special:Newimages and Special:ListFiles",
"comment":"When pages are renamed, their RC entries do _not_ change.",
"type":"integer",
"options":{
"notnull":true,
"default":0
}
},
{
"name":"rc_title",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":255
}
},
{
"name":"rc_comment_id",
"comment":"as in revision...",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"rc_minor",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_bot",
"comment":"Edits by user accounts with the 'bot' rights key are marked with a 1 here, and will be hidden from the default view.",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_new",
"comment":"Set if this change corresponds to a page creation",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_cur_id",
"comment":"Key to page_id (was cur_id prior to 1.5). This will keep links working after moves while retaining the at-the-time name in the changes list.",
"type":"integer",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_this_oldid",
"comment":"rev_id of the given revision",
"type":"integer",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_last_oldid",
"comment":"rev_id of the prior revision, for generating diff links.",
"type":"integer",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_type",
"comment":"The type of change entry (RC_EDIT,RC_NEW,RC_LOG,RC_EXTERNAL)",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_source",
"comment":"The source of the change entry (replaces rc_type) default of '' is temporary, needed for initial migration",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":16
}
},
{
"name":"rc_patrolled",
"comment":"If the Recent Changes Patrol option 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.",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_ip",
"comment":"Recorded IP address the edit was made from, if the $wgPutIPinRC option is enabled.",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":40
}
},
{
"name":"rc_old_len",
"comment":"Text length in characters before the edit",
"type":"integer",
"options":{
"notnull":false
}
},
{
"name":"rc_new_len",
"comment":"Text length in characters after the edit",
"type":"integer",
"options":{
"notnull":false
}
},
{
"name":"rc_deleted",
"comment":"Visibility of recent changes items, bitfield",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_logid",
"comment":"Value corresponding to log_id, specific log entries",
"type":"integer",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"rc_log_type",
"comment":"Store log type info here, or null",
"type":"binary",
"options":{
"notnull":false,
"default":null,
"length":255
}
},
{
"name":"rc_log_action",
"comment":"Store log action or null",
"type":"binary",
"options":{
"notnull":false,
"default":null,
"length":255
}
},
{
"name":"rc_params",
"comment":"Log params",
"type":"blob",
"options":{
"notnull":false,
"length":65535
}
}
],
"indexes":[
{
"name":"rc_timestamp",
"comment":"Special:Recentchanges",
"columns":[
"rc_timestamp"
],
"unique":false
},
{
"name":"rc_namespace_title_timestamp",
"comment":"Special:Watchlist",
"columns":[
"rc_namespace",
"rc_title",
"rc_timestamp"
],
"unique":false
},
{
"name":"rc_cur_id",
"comment":"Special:Recentchangeslinked when finding changes in pages linked from a page",
"comment":"Archive area for deleted pages and their revisions. These may be viewed (and restored) by admins through the Special:Undelete interface.",
"columns":[
{
"name":"ar_id",
"comment":"Primary key",
"type":"integer",
"options":{
"autoincrement":true,
"unsigned":true,
"notnull":true
}
},
{
"name":"ar_namespace",
"comment":"Copied from page_namespace",
"type":"integer",
"options":{
"notnull":true,
"default":0
}
},
{
"name":"ar_title",
"comment":"Copied from page_title",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":255
}
},
{
"name":"ar_comment_id",
"comment":"Basic revision stuff.",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"ar_actor",
"comment":"Basic revision stuff.",
"type":"bigint",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"ar_timestamp",
"comment":"Basic revision stuff.",
"type":"mwtimestamp",
"options":{
"notnull":true,
"length":14
}
},
{
"name":"ar_minor_edit",
"comment":"Basic revision stuff.",
"type":"mwtinyint",
"options":{
"notnull":true,
"default":0
}
},
{
"name":"ar_rev_id",
"comment":"Copied from rev_id. @since 1.5 Entries from 1.4 will be NULL here. When restoring archive rows from before 1.5, a new rev_id is created.",
"type":"integer",
"options":{
"unsigned":true,
"notnull":true
}
},
{
"name":"ar_deleted",
"comment":"Copied from rev_deleted. Although this may be raised during deletion. Users with the \"suppressrevision\" right may \"archive\" and \"suppress\" content in a single action. @since 1.10",
"type":"mwtinyint",
"options":{
"unsigned":true,
"notnull":true,
"default":0
}
},
{
"name":"ar_len",
"comment":"Copied from rev_len, length of this revision in bytes. @since 1.10",
"type":"integer",
"options":{
"unsigned":true,
"notnull":false
}
},
{
"name":"ar_page_id",
"comment":"Copied from page_id. Restoration will attempt to use this as page ID if no current page with the same name exists. Otherwise, the revisions will be restored under the current page. Can be used for manual undeletion by developers if multiple pages by the same name were archived. @since 1.11 Older entries will have NULL.",
"type":"integer",
"options":{
"unsigned":true,
"notnull":false
}
},
{
"name":"ar_parent_id",
"comment":"Copied from rev_parent_id. @since 1.13",
"type":"integer",
"options":{
"unsigned":true,
"notnull":false,
"default":null
}
},
{
"name":"ar_sha1",
"comment":"Copied from rev_sha1, SHA-1 text content hash in base-36 @since 1.19",
"type":"binary",
"options":{
"notnull":true,
"default":"",
"length":32
}
}
],
"indexes":[
{
"name":"ar_name_title_timestamp",
"comment":"Index for Special:Undelete to page through deleted revisions",
"columns":[
"ar_namespace",
"ar_title",
"ar_timestamp"
],
"unique":false
},
{
"name":"ar_actor_timestamp",
"comment":"Index for Special:DeletedContributions",
"columns":[
"ar_actor",
"ar_timestamp"
],
"unique":false
},
{
"name":"ar_revid_uniq",
"comment":"Index for linking archive rows with tables that normally link with revision rows, such as change_tag.",
"comment":"A page name is broken into a namespace and a title. The namespace keys are UI-language-independent constants, defined in includes/Defines.php",
"type":"integer",
"options":{"notnull":true}
},
{
"name":"page_title",
"comment":"The rest of the title, as text. Spaces are transformed into underscores in title storage.",
"comment":"Random value between 0 and 1, used for Special:Randompage",
"type":"float",
"options":{
"notnull":true,
"unsigned":true,
"CustomSchemaOptions":{
"doublePrecision":true
}
}
},
{
"name":"page_touched",
"comment":"This timestamp is updated whenever the page changes in a way requiring it to be re-rendered, invalidating caches. Aside from editing this includes permission changes, creation or deletion of linked pages, and alteration of contained templates.",
"type":"mwtimestamp",
"options":{"notnull":true}
},
{
"name":"page_links_updated",
"comment":"This timestamp is updated whenever a page is re-parsed and it has all the link tracking tables updated for it. This is useful for de-duplicating expensive backlink update jobs.",
"type":"mwtimestamp",
"options":{
"notnull":false,
"default":null,
"CustomSchemaOptions":{
"allowInfinite":true
}
}
},
{
"name":"page_latest",
"comment":"Handy key to revision.rev_id of the current revision. This may be 0 during page creation, but that shouldn't happen outside of a transaction... hopefully.",
"type":"integer",
"options":{"unsigned":true,"notnull":true}
},
{
"name":"page_len",
"comment":"Uncompressed length in bytes of the page's current source text.",
"type":"integer",
"options":{"unsigned":true,"notnull":true}
},
{
"name":"page_content_model",
"comment":"content model, see CONTENT_MODEL_XXX constants",
"comment":"The title index. Care must be taken to always specify a namespace when by title, so that the index is used. Even listing all known namespaces with IN() is better than omitting page_namespace from the WHERE clause.",
"unique":true
},
{
"name":"page_random",
"columns":["page_random"],
"comment":"Index for Special:Random",
"unique":false
},
{
"name":"page_len",
"columns":["page_len"],
"comment":"Questionable utility, used by ProofreadPage, possibly DynamicPageList. ApiQueryAllPages unconditionally filters on namespace and so hopefully does not use it.",
"comment":"The user table contains basic account information, authentication keys, etc. Some multi-wiki sites may share a single central user table between separate wikis using the $wgSharedDB setting. Note that even when an external authentication plugin is in use, user table entries still need to be created to store preferences and to key tracking information in the other tables",
"comment":"Usernames must be unique, must not be in the form of an IP address. They should not allow slashes or case conflicts. Spaces are allowed, and are not converted to underscores like in page titles.",
"comment":"When using 'mail me a new password', a random password is generated and the hash stored here. The previous password is left in place until someone actually logs in with the new password, at which point the hash is moved to user_password and the old password is invalidated.",
"type":"blob",
"options":{"notnull":true,"length":255}
},
{
"name":"user_newpass_time",
"comment":"Timestamp of the last time when a new password was sent, for throttling and expiring purposes. Emailed passwords will expire $wgNewPasswordExpiry (a week) after being set. If user_newpass_time is NULL (eg. created by mail) it doesn't expire.",
"type":"mwtimestamp",
"options":{"notnull":false,"length":14}
},
{
"name":"user_email",
"comment":"User email. Non public info.",
"type":"text",
"options":{"notnull":true,"length":255}
},
{
"name":"user_touched",
"comment":"If the browser sends an If-Modified-Since header, a 304 response is suppressed if the value in this field for the current user is later than the value in the IMS header. That is, this field is an invalidation timestamp for the browser cache of logged-in users. Among other things, it is used to prevent pages generated for a previously logged in user from being displayed after a session expiry followed by a fresh login.",
"type":"mwtimestamp",
"options":{"notnull":true,"length":14}
},
{
"name":"user_token",
"comment":"A pseudorandomly generated value that is stored in a cookie when the 'remember password' feature is used (previously, a hash of the password was used, but this was vulnerable to cookie-stealing attacks)",
"comment":"Count of edits and edit-like actions. Not intended to be an accurate copy of 'COUNT(*) WHERE rev_actor refers to a user's actor_id'. May contain NULL for old accounts if batch-update scripts haven't been run, as well as listing deleted edits and other myriad ways it could be out of sync. Meant primarily for heuristic checks to give an impression of whether the account has been used much.",
"comment":"The index is proposed for removal, do not use it in new code: T163532. Used for ordering revisions within a page by rev_id, which is usually incorrect, since rev_timestamp is normally the correct order. It can also be used by dumpBackup.php, if a page and rev_id range is specified.",
"comment":"Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified",
"comment":"search backend, this is actively used in MySQL but created and not used in Postgres while there are plans to use it in the future (T220450). This table must be MyISAM in MySQL; InnoDB does not support the needed fulltext index.",