Jump to content

Template:SchemaDiagram/sql/mediawiki-1.42.1.json

From mediawiki.org
name"site_identifiers"
comment"Links local site identifiers to their corresponding site."
columns
name"si_type"
comment"local key type, ie 'interwiki' or 'langlink'"
type"binary"
options
length32
notnulltrue
name"si_key"
comment"local key value, ie 'en' or 'wiktionary'"
type"binary"
options
length32
notnulltrue
name"si_site"
comment"Key on sites.site_id"
type"integer"
options
unsignedtrue
notnulltrue
indexes
name"si_site"
columns
"si_site"
uniquefalse
name"si_key"
columns
"si_key"
uniquefalse
pk
"si_type"
"si_key"
name"updatelog"
comment"A table to log updates, one text key row per update."
columns
name"ul_key"
type"string"
options
length255
notnulltrue
name"ul_value"
type"blob"
options
length65530
notnullfalse
indexes
Empty array
pk
"ul_key"
name"actor"
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."
columns
name"actor_id"
comment"Unique ID to identify each actor"
type"bigint"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"actor_user"
comment"Key to user.user_id, or NULL for anonymous edits"
type"integer"
options
unsignedtrue
notnullfalse
name"actor_name"
comment"Text username or IP address"
type"binary"
options
length255
notnulltrue
indexes
name"actor_user"
columns
"actor_user"
uniquetrue
name"actor_name"
columns
"actor_name"
uniquetrue
pk
"actor_id"
name"user_former_groups"
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."
columns
name"ufg_user"
comment"Key to user_id"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"ufg_group"
type"binary"
options
length255
notnulltrue
default""
indexes
Empty array
pk
"ufg_user"
"ufg_group"
name"bot_passwords"
comment"This table contains a user's bot passwords: passwords that allow access to the account via the API with limited rights."
columns
name"bp_user"
comment"User ID obtained from CentralIdLookup."
type"integer"
options
unsignedtrue
notnulltrue
name"bp_app_id"
comment"Application identifier."
type"binary"
options
length32
notnulltrue
name"bp_password"
comment"Password hashes, like user.user_password."
type"blob"
options
length255
notnulltrue
name"bp_token"
comment"Like user.user_token"
type"binary"
options
length32
notnulltrue
default""
fixedtrue
name"bp_restrictions"
comment"JSON blob for MWRestrictions"
type"blob"
options
length65535
notnulltrue
name"bp_grants"
comment"Grants allowed to the account when authenticated with this bot-password"
type"blob"
options
length65535
notnulltrue
indexes
Empty array
pk
"bp_user"
"bp_app_id"
name"comment"
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."
columns
name"comment_id"
comment"Unique ID to identify each comment"
type"bigint"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"comment_hash"
comment"Hash of comment_text and comment_data, for deduplication"
type"integer"
options
notnulltrue
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 MediaWiki\CommentFormatter\CommentFormatter::format(). Size limits are enforced at the application level, and should take care to crop UTF-8 strings appropriately."
type"blob"
options
length65535
notnulltrue
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."
type"blob"
options
length65535
notnullfalse
indexes
name"comment_hash"
columns
"comment_hash"
uniquefalse
pk
"comment_id"
name"slots"
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
unsignedtrue
notnulltrue
name"slot_role_id"
comment"reference to role_id"
type"smallint"
options
unsignedtrue
notnulltrue
name"slot_content_id"
comment"reference to content_id"
type"bigint"
options
unsignedtrue
notnulltrue
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."
type"bigint"
options
unsignedtrue
notnulltrue
indexes
name"slot_revision_origin_role"
columns
"slot_revision_id"
"slot_origin"
"slot_role_id"
comment"Index for finding revisions that modified a specific slot"
uniquefalse
pk
"slot_revision_id"
"slot_role_id"
name"site_stats"
comment"Contains a single row with some aggregate info on the state of the site."
columns
name"ss_row_id"
comment"The single row should contain 1 here."
type"integer"
options
unsignedtrue
notnulltrue
name"ss_total_edits"
comment"Total number of edits performed."
type"bigint"
options
unsignedtrue
notnullfalse
defaultnull
name"ss_good_articles"
comment"See SiteStatsInit::articles()."
type"bigint"
options
unsignedtrue
notnullfalse
defaultnull
name"ss_total_pages"
comment"Total pages, theoretically equal to SELECT COUNT(*) FROM page."
type"bigint"
options
unsignedtrue
notnullfalse
defaultnull
name"ss_users"
comment"Number of users, theoretically equal to SELECT COUNT(*) FROM user."
type"bigint"
options
unsignedtrue
notnullfalse
defaultnull
name"ss_active_users"
comment"Number of users that still edit."
type"bigint"
options
unsignedtrue
notnullfalse
defaultnull
name"ss_images"
comment"Number of images, equivalent to SELECT COUNT(*) FROM image."
type"bigint"
options
unsignedtrue
notnullfalse
defaultnull
indexes
Empty array
pk
"ss_row_id"
name"user_properties"
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 sensible table structure."
columns
name"up_user"
comment"Foreign key to user.user_id"
type"integer"
options
unsignedtrue
notnulltrue
name"up_property"
comment"Name of the option being saved. This is indexed for bulk lookup."
type"binary"
options
length255
notnulltrue
name"up_value"
comment"Property value as a string."
type"blob"
options
length65530
notnullfalse
indexes
name"up_property"
columns
"up_property"
uniquefalse
pk
"up_user"
"up_property"
name"log_search"
columns
name"ls_field"
comment"The type of ID (rev ID, log ID, rev timestamp, username)"
type"binary"
options
length32
notnulltrue
name"ls_value"
comment"The value of the ID"
type"string"
options
length255
notnulltrue
name"ls_log_id"
comment"Key to log_id"
type"integer"
options
unsignedtrue
notnulltrue
default0
indexes
name"ls_log_id"
columns
"ls_log_id"
uniquefalse
pk
"ls_field"
"ls_value"
"ls_log_id"
name"change_tag"
comment"A table to track tags for revisions, logs and recent changes"
columns
name"ct_id"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"ct_rc_id"
comment"RCID for the change"
type"integer"
options
unsignedtrue
notnullfalse
defaultnull
name"ct_log_id"
comment"LOGID for the change"
type"integer"
options
unsignedtrue
notnullfalse
defaultnull
name"ct_rev_id"
comment"REVID for the change"
type"integer"
options
unsignedtrue
notnullfalse
defaultnull
name"ct_params"
comment"Parameters for the tag; used by some extensions"
type"blob"
options
length65530
notnullfalse
defaultnull
name"ct_tag_id"
comment"Foreign key to change_tag_def row"
type"integer"
options
unsignedtrue
notnulltrue
indexes
name"ct_rc_tag_id"
columns
"ct_rc_id"
"ct_tag_id"
uniquetrue
name"ct_log_tag_id"
columns
"ct_log_id"
"ct_tag_id"
uniquetrue
name"ct_rev_tag_id"
columns
"ct_rev_id"
"ct_tag_id"
uniquetrue
name"ct_tag_id_id"
comment"Covering index, so we can pull all the info only out of the index."
columns
"ct_tag_id"
"ct_rc_id"
"ct_rev_id"
"ct_log_id"
uniquefalse
pk
"ct_id"
name"content"
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."
columns
name"content_id"
comment"ID of the content object"
type"bigint"
options
notnulltrue
unsignedtrue
autoincrementtrue
name"content_size"
comment"Nominal size of the content object (not necessarily of the serialized blob)"
type"integer"
options
notnulltrue
unsignedtrue
name"content_sha1"
comment"Nominal hash of the content object (not necessarily of the serialized blob)"
type"binary"
options
notnulltrue
length32
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."
type"smallint"
options
notnulltrue
unsignedtrue
name"content_address"
comment"URL-like address of the content blob"
type"binary"
options
notnulltrue
length255
indexes
Empty array
pk
"content_id"
name"l10n_cache"
comment"Table for storing localisation data"
columns
name"lc_lang"
comment"Language code"
type"binary"
options
notnulltrue
length35
name"lc_key"
comment"Cache key"
type"string"
options
notnulltrue
length255
name"lc_value"
comment"Value"
type"blob"
options
notnulltrue
length16777215
indexes
Empty array
pk
"lc_lang"
"lc_key"
name"module_deps"
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
notnulltrue
length255
name"md_skin"
comment"Module context vary (includes skin and language; called "md_skin" for legacy reasons)"
type"binary"
options
notnulltrue
length32
name"md_deps"
comment"JSON blob with file dependencies"
type"blob"
options
notnulltrue
length16777215
indexes
Empty array
pk
"md_module"
"md_skin"
name"redirect"
comment"For each redirect, this table contains exactly one row defining its target. Redirect targets are key to page_namespace/page_title of the target page. 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"rd_from"
comment"Key to the page_id of the redirect page"
type"integer"
options
notnulltrue
unsignedtrue
default0
name"rd_namespace"
type"integer"
options
notnulltrue
default0
name"rd_title"
type"binary"
options
notnulltrue
length255
default""
name"rd_interwiki"
type"string"
options
notnullfalse
length32
defaultnull
comment"After T346290 all values have been computed and this field is never null. TODO: Mark as not null (T348029)."
name"rd_fragment"
type"binary"
options
notnullfalse
length255
defaultnull
comment"After T346290 all values have been computed and this field is never null. TODO: Mark as not null (T348029)."
indexes
name"rd_ns_title"
columns
"rd_namespace"
"rd_title"
"rd_from"
uniquefalse
pk
"rd_from"
name"pagelinks"
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."
type"integer"
options
notnulltrue
unsignedtrue
default0
name"pl_namespace"
type"integer"
options
notnulltrue
default0
name"pl_title"
type"binary"
options
notnulltrue
length255
default""
name"pl_from_namespace"
type"integer"
comment"Namespace for pl_from page"
options
notnulltrue
default0
name"pl_target_id"
type"bigint"
comment"Foreign key to linktarget.lt_id"
options
notnullfalse
unsignedtrue
indexes
name"pl_namespace"
columns
"pl_namespace"
"pl_title"
"pl_from"
comment"Reverse index, for Special:Whatlinkshere"
uniquefalse
name"pl_backlinks_namespace"
columns
"pl_from_namespace"
"pl_namespace"
"pl_title"
"pl_from"
comment"Index for Special:Whatlinkshere with namespace filter"
uniquefalse
name"pl_target_id"
columns
"pl_target_id"
"pl_from"
comment"Reverse index, for Special:Whatlinkshere"
uniquefalse
name"pl_backlinks_namespace_target_id"
columns
"pl_from_namespace"
"pl_target_id"
"pl_from"
comment"Index for Special:Whatlinkshere with namespace filter"
uniquefalse
pk
"pl_from"
"pl_namespace"
"pl_title"
name"templatelinks"
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."
type"integer"
options
notnulltrue
unsignedtrue
default0
name"tl_from_namespace"
type"integer"
comment"Namespace for this page"
options
notnulltrue
default0
name"tl_target_id"
type"bigint"
comment"Foreign key to linktarget.lt_id"
options
notnulltrue
unsignedtrue
indexes
name"tl_target_id"
columns
"tl_target_id"
"tl_from"
comment"Reverse index, for Special:Whatlinkshere"
uniquefalse
name"tl_backlinks_namespace_target_id"
columns
"tl_from_namespace"
"tl_target_id"
"tl_from"
comment"Index for Special:Whatlinkshere with namespace filter"
uniquefalse
pk
"tl_from"
"tl_target_id"
name"imagelinks"
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."
type"integer"
options
notnulltrue
unsignedtrue
default0
name"il_from_namespace"
type"integer"
comment"Namespace for this page"
options
notnulltrue
default0
name"il_to"
type"binary"
comment"Filename of target image. This is also the page_title of the file's description page; all such pages are in namespace 6 (NS_FILE)."
options
notnulltrue
length255
default""
indexes
name"il_to"
columns
"il_to"
"il_from"
comment"Reverse index, for Special:Whatlinkshere and file description page local usage"
uniquefalse
name"il_backlinks_namespace"
columns
"il_from_namespace"
"il_to"
"il_from"
comment"Index for Special:Whatlinkshere with namespace filter"
uniquefalse
pk
"il_from"
"il_to"
name"langlinks"
comment"Track interlanguage links."
columns
name"ll_from"
comment"page_id of the referring page"
type"integer"
options
notnulltrue
unsignedtrue
default0
name"ll_lang"
type"binary"
comment"Language code of the target"
options
notnulltrue
length35
default""
name"ll_title"
type"binary"
comment"Title of the target, including namespace"
options
notnulltrue
length255
default""
indexes
name"ll_lang"
columns
"ll_lang"
"ll_title"
comment"Index for ApiQueryLangbacklinks"
uniquefalse
pk
"ll_from"
"ll_lang"
name"iwlinks"
comment"Track inline interwiki links"
columns
name"iwl_from"
comment"page_id of the referring page"
type"integer"
options
notnulltrue
unsignedtrue
default0
name"iwl_prefix"
type"binary"
comment"Interwiki prefix code of the target"
options
notnulltrue
length32
default""
name"iwl_title"
type"binary"
comment"Title of the target, including namespace"
options
notnulltrue
length255
default""
indexes
name"iwl_prefix_title_from"
columns
"iwl_prefix"
"iwl_title"
"iwl_from"
comment"Index for ApiQueryIWBacklinks"
uniquefalse
pk
"iwl_from"
"iwl_prefix"
"iwl_title"
name"category"
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."
columns
name"cat_id"
comment"Primary key"
type"integer"
options
notnulltrue
unsignedtrue
autoincrementtrue
name"cat_title"
type"binary"
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)."
options
notnulltrue
length255
name"cat_pages"
type"integer"
options
notnulltrue
default0
name"cat_subcats"
type"integer"
options
notnulltrue
default0
name"cat_files"
type"integer"
options
notnulltrue
default0
indexes
name"cat_title"
columns
"cat_title"
uniquetrue
name"cat_pages"
columns
"cat_pages"
comment"For Special:Mostlinkedcategories"
uniquefalse
pk
"cat_id"
name"watchlist_expiry"
comment"Allows setting an expiry for watchlist items."
columns
name"we_item"
comment"Key to watchlist.wl_id"
type"integer"
options
notnulltrue
unsignedtrue
name"we_expiry"
type"mwtimestamp"
comment"Expiry time"
options
notnulltrue
indexes
name"we_expiry"
columns
"we_expiry"
uniquefalse
pk
"we_item"
name"change_tag_def"
comment"Table defining tag names for IDs. Also stores hit counts to avoid expensive queries on change_tag"
columns
name"ctd_id"
comment"Numerical ID of the tag (ct_tag_id refers to this)"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"ctd_name"
comment"Symbolic name of the tag (what would previously be put in ct_tag)"
type"binary"
options
length255
notnulltrue
name"ctd_user_defined"
comment"Whether this tag was defined manually by a privileged user using Special:Tags"
type"mwtinyint"
options
notnulltrue
length1
name"ctd_count"
comment"Number of times this tag was used"
type"bigint"
options
unsignedtrue
notnulltrue
default0
indexes
name"ctd_name"
columns
"ctd_name"
uniquetrue
name"ctd_count"
columns
"ctd_count"
uniquefalse
name"ctd_user_defined"
columns
"ctd_user_defined"
uniquefalse
pk
"ctd_id"
name"ipblocks_restrictions"
comment"Partial Block Restrictions"
columns
name"ir_ipb_id"
comment"The ipb_id from ipblocks"
type"integer"
options
notnulltrue
unsignedtrue
name"ir_type"
comment"The restriction type id."
type"mwtinyint"
options
notnulltrue
length4
name"ir_value"
comment"The restriction id that corresponds to the type: page ID, namespace ID or BlockActionInfo ID."
type"integer"
options
notnulltrue
unsignedtrue
indexes
name"ir_type_value"
comment"Index to query restrictions by the page or namespace."
columns
"ir_type"
"ir_value"
uniquefalse
pk
"ir_ipb_id"
"ir_type"
"ir_value"
name"querycache"
comment"Used for caching expensive grouped queries"
columns
name"qc_type"
comment"A key name, generally the base name of of the special page"
type"binary"
options
length32
notnulltrue
name"qc_value"
comment"Some sort of stored value. Sizes, counts..."
type"integer"
options
notnulltrue
unsignedtrue
default0
name"qc_namespace"
type"integer"
options
notnulltrue
default0
name"qc_title"
type"binary"
options
length255
notnulltrue
default""
indexes
name"qc_type"
columns
"qc_type"
"qc_value"
uniquefalse
pk
Empty array
name"querycachetwo"
comment"Used for caching expensive grouped queries that need two links (for example double-redirects)"
columns
name"qcc_type"
comment"A key name, generally the base name of of the special page."
type"binary"
options
length32
notnulltrue
name"qcc_value"
comment"Some sort of stored value. Sizes, counts..."
type"integer"
options
notnulltrue
unsignedtrue
default0
name"qcc_namespace"
type"integer"
options
notnulltrue
default0
name"qcc_title"
type"binary"
options
length255
notnulltrue
default""
name"qcc_namespacetwo"
type"integer"
options
notnulltrue
default0
name"qcc_titletwo"
type"binary"
options
length255
notnulltrue
default""
indexes
name"qcc_type"
columns
"qcc_type"
"qcc_value"
uniquefalse
name"qcc_title"
columns
"qcc_type"
"qcc_namespace"
"qcc_title"
uniquefalse
name"qcc_titletwo"
columns
"qcc_type"
"qcc_namespacetwo"
"qcc_titletwo"
uniquefalse
pk
Empty array
name"page_restrictions"
comment"Used for storing page restrictions (i.e. protection levels)"
columns
name"pr_id"
comment"Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"pr_page"
comment"Page to apply restrictions to (Foreign Key to page)."
type"integer"
options
notnulltrue
unsignedtrue
name"pr_type"
comment"The protection type (edit, move, etc)"
type"binary"
options
length60
notnulltrue
name"pr_level"
comment"The protection level (Sysop, autoconfirmed, etc)"
type"binary"
options
length60
notnulltrue
name"pr_cascade"
type"mwtinyint"
options
notnulltrue
name"pr_expiry"
comment"Field for time-limited protection."
type"mwtimestamp"
options
notnullfalse
CustomSchemaOptions
allowInfinitetrue
indexes
name"pr_pagetype"
columns
"pr_page"
"pr_type"
uniquetrue
name"pr_typelevel"
columns
"pr_type"
"pr_level"
uniquefalse
name"pr_level"
columns
"pr_level"
uniquefalse
name"pr_cascade"
columns
"pr_cascade"
uniquefalse
pk
"pr_id"
name"user_groups"
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."
columns
name"ug_user"
comment"Key to user_id"
type"integer"
options
notnulltrue
unsignedtrue
default0
name"ug_group"
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."
type"binary"
options
length255
notnulltrue
default""
name"ug_expiry"
comment"Time at which the user group membership will expire. Set to NULL for a non-expiring (infinite) membership."
type"mwtimestamp"
options
notnullfalse
defaultnull
CustomSchemaOptions
allowInfinitetrue
indexes
name"ug_group"
columns
"ug_group"
uniquefalse
name"ug_expiry"
columns
"ug_expiry"
uniquefalse
pk
"ug_user"
"ug_group"
name"querycache_info"
comment"Details of updates to cached special pages"
columns
name"qci_type"
comment"Special page name. Corresponds to a qc_type value"
type"binary"
options
length32
notnulltrue
default""
name"qci_timestamp"
comment"Timestamp of last update"
type"mwtimestamp"
options
notnulltrue
default"19700101000000"
indexes
Empty array
pk
"qci_type"
name"watchlist"
columns
name"wl_id"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"wl_user"
type"integer"
options
notnulltrue
unsignedtrue
name"wl_namespace"
type"integer"
options
notnulltrue
default0
name"wl_title"
type"binary"
options
length255
notnulltrue
default""
name"wl_notificationtimestamp"
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."
type"mwtimestamp"
options
notnullfalse
indexes
name"wl_user"
columns
"wl_user"
"wl_namespace"
"wl_title"
comment"Special:Watchlist"
uniquetrue
name"wl_namespace_title"
columns
"wl_namespace"
"wl_title"
comment"Special:Movepage (WatchedItemStore::duplicateEntry)"
uniquefalse
name"wl_user_notificationtimestamp"
columns
"wl_user"
"wl_notificationtimestamp"
comment"ApiQueryWatchlistRaw changed filter"
uniquefalse
pk
"wl_id"
name"sites"
comment"Holds all the sites known to the wiki."
columns
name"site_id"
type"integer"
comment"Numeric id of the site"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"site_global_key"
type"binary"
comment"Global identifier for the site, ie 'enwiktionary'"
options
notnulltrue
length64
name"site_type"
type"binary"
comment"Type of the site, ie 'mediawiki'"
options
notnulltrue
length32
name"site_group"
type"binary"
comment"Group of the site, ie 'wikipedia'"
options
notnulltrue
length32
name"site_source"
type"binary"
comment"Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'"
options
notnulltrue
length32
name"site_language"
type"binary"
comment"Language code of the sites primary language."
options
notnulltrue
length35
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
notnulltrue
length32
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
notnulltrue
length255
name"site_data"
type"blob"
comment"Type dependent site data."
options
notnulltrue
length65530
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
notnulltrue
length1
name"site_config"
type"blob"
comment"Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki."
options
notnulltrue
length65530
indexes
name"site_global_key"
columns
"site_global_key"
uniquetrue
pk
"site_id"
name"user_newtalk"
comment"Stores notifications of user talk page changes, for the display of the 'you have new messages' box"
columns
name"user_id"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"user_ip"
comment"If the user is an anonymous user their IP address is stored here since the user_id of 0 is ambiguous"
type"binary"
options
length40
notnulltrue
default""
name"user_last_timestamp"
comment"The highest timestamp of revisions of the talk page viewed by this user"
type"mwtimestamp"
options
notnullfalse
indexes
name"un_user_id"
columns
"user_id"
uniquefalse
name"un_user_ip"
columns
"user_ip"
uniquefalse
pk
Empty array
name"interwiki"
comment"Recognized interwiki link prefixes"
columns
name"iw_prefix"
type"string"
comment"The interwiki prefix, (e.g. "Meatball", or the language prefix "de")"
options
length32
notnulltrue
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
notnulltrue
length65530
name"iw_api"
type"blob"
comment"The URL of the file api.php"
options
notnulltrue
length65530
name"iw_wikiid"
type"string"
comment"The name of the database (for a connection to be established with LBFactory::getMainLB( 'wikiid' ))"
options
notnulltrue
length64
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
notnulltrue
length1
name"iw_trans"
type"mwtinyint"
comment"Boolean value indicating whether interwiki transclusions are allowed."
options
notnulltrue
default0
indexes
Empty array
pk
"iw_prefix"
name"protected_titles"
comment"Used for storing nonexistent pages that have been protected"
columns
name"pt_namespace"
type"integer"
options
notnulltrue
name"pt_title"
type"binary"
options
length255
notnulltrue
name"pt_user"
type"integer"
options
unsignedtrue
notnulltrue
name"pt_reason_id"
type"bigint"
options
unsignedtrue
notnulltrue
name"pt_timestamp"
type"mwtimestamp"
options
notnulltrue
name"pt_expiry"
type"mwtimestamp"
options
notnulltrue
CustomSchemaOptions
allowInfinitetrue
name"pt_create_perm"
type"binary"
options
length60
notnulltrue
indexes
name"pt_timestamp"
columns
"pt_timestamp"
uniquefalse
pk
"pt_namespace"
"pt_title"
name"externallinks"
comment"Track links to external URLs"
columns
name"el_id"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"el_from"
type"integer"
comment"page_id of the referring page"
options
unsignedtrue
notnulltrue
default0
name"el_to_domain_index"
type"binary"
comment"Indexable domain"
options
notnulltrue
length255
default""
name"el_to_path"
type"blob"
comment"Path to the external link without considering the domain"
options
length65530
notnullfalse
indexes
name"el_from"
columns
"el_from"
uniquefalse
name"el_to_domain_index_to_path"
columns
"el_to_domain_index"
"el_to_path"
uniquefalse
options
lengths
null
60
pk
"el_id"
name"ip_changes"
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"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"ipc_rev_timestamp"
comment"The timestamp of the revision"
type"mwtimestamp"
options
notnulltrue
name"ipc_hex"
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"
type"binary"
options
length35
notnulltrue
default""
indexes
name"ipc_rev_timestamp"
columns
"ipc_rev_timestamp"
uniquefalse
name"ipc_hex_time"
columns
"ipc_hex"
"ipc_rev_timestamp"
uniquefalse
pk
"ipc_rev_id"
name"page_props"
comment"Name/value pairs indexed by page_id"
columns
name"pp_page"
type"integer"
options
notnulltrue
unsignedtrue
name"pp_propname"
type"binary"
options
length60
notnulltrue
name"pp_value"
type"blob"
options
length65530
notnulltrue
name"pp_sortkey"
type"float"
options
notnullfalse
indexes
name"pp_propname_page"
columns
"pp_propname"
"pp_page"
uniquetrue
name"pp_propname_sortkey_page"
columns
"pp_propname"
"pp_sortkey"
"pp_page"
uniquetrue
options
where"(pp_sortkey IS NOT NULL)"
pk
"pp_page"
"pp_propname"
name"job"
comment"Jobs performed by parallel apache threads or a command-line daemon"
columns
name"job_id"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"job_cmd"
comment"Command name. Limited to 60 to prevent key length overflow"
type"binary"
options
notnulltrue
default""
length60
name"job_namespace"
comment"Namespace to act on. Should be 0 if the command does not operate on a title"
type"integer"
options
notnulltrue
name"job_title"
comment"Title to act on. Should be '' if the command does not operate on a title"
type"binary"
options
notnulltrue
length255
name"job_timestamp"
comment"Timestamp of when the job was inserted. NULL for jobs added before addition of the timestamp"
type"mwtimestamp"
options
notnullfalse
name"job_params"
comment"Any other parameters to the command. Stored as a PHP serialized array, or an empty string if there are no parameters"
type"blob"
options
notnulltrue
length16777215
name"job_random"
comment"Random, non-unique, number used for job acquisition (for lock concurrency)"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"job_attempts"
comment"The number of times this job has been locked"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"job_token"
comment"Field that conveys process locks on rows via process UUIDs"
type"binary"
options
notnulltrue
default""
length32
name"job_token_timestamp"
comment"Timestamp when the job was locked"
type"mwtimestamp"
options
notnullfalse
name"job_sha1"
comment"Base 36 SHA1 of the job parameters relevant to detecting duplicates"
type"binary"
options
notnulltrue
length32
default""
indexes
name"job_sha1"
columns
"job_sha1"
uniquefalse
name"job_cmd_token"
columns
"job_cmd"
"job_token"
"job_random"
uniquefalse
name"job_cmd_token_id"
columns
"job_cmd"
"job_token"
"job_id"
uniquefalse
name"job_cmd"
columns
"job_cmd"
"job_namespace"
"job_title"
"job_params"
uniquefalse
options
lengths
null
null
null
128
name"job_timestamp"
columns
"job_timestamp"
uniquefalse
pk
"job_id"
name"slot_roles"
comment"Normalization table for role names"
columns
name"role_id"
type"integer"
options
notnulltrue
autoincrementtrue
name"role_name"
type"binary"
options
notnulltrue
length64
indexes
name"role_name"
columns
"role_name"
comment"Index for looking up the internal ID of a role"
uniquetrue
pk
"role_id"
name"content_models"
comment"Normalization table for content model names"
columns
name"model_id"
type"integer"
options
notnulltrue
autoincrementtrue
name"model_name"
type"binary"
options
notnulltrue
length64
indexes
name"model_name"
columns
"model_name"
comment"Index for looking up the internal ID of a model"
uniquetrue
pk
"model_id"
name"categorylinks"
comment"Track category inclusions *used inline* This tracks a single level of category membership"
columns
name"cl_from"
comment"Key to page_id of the page defined as a category member."
type"integer"
options
unsignedtrue
notnulltrue
default0
name"cl_to"
comment"Name of the category. This is also the page_title of the category's description page; all such pages are in namespace 14 (NS_CATEGORY)."
type"binary"
options
notnulltrue
default""
length255
name"cl_sortkey"
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."
type"binary"
options
notnulltrue
default""
length230
name"cl_sortkey_prefix"
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."
type"binary"
options
notnulltrue
default""
length255
name"cl_timestamp"
comment"This isn't really used at present. Provided for an optional sorting method by approximate addition time."
type"datetimetz"
options
notnulltrue
PlatformOptions
versiontrue
name"cl_collation"
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."
type"binary"
options
notnulltrue
default""
length32
name"cl_type"
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
notnulltrue
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?"
columns
"cl_to"
"cl_type"
"cl_sortkey"
"cl_from"
uniquefalse
name"cl_timestamp"
comment"Used by the API (and some extensions)"
columns
"cl_to"
"cl_timestamp"
uniquefalse
pk
"cl_from"
"cl_to"
name"logging"
columns
name"log_id"
comment"Log ID, for referring to this specific log entry, probably for deletion and such."
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"log_type"
comment"Symbolic key for the general log type. The output format will be controlled by the log_action field."
type"binary"
options
notnulltrue
default""
length32
name"log_action"
comment"Symbolic key for the log action type."
type"binary"
options
notnulltrue
default""
length32
name"log_timestamp"
type"mwtimestamp"
options
notnulltrue
default"19700101000000"
name"log_actor"
type"bigint"
options
notnulltrue
unsignedtrue
name"log_namespace"
comment"Key to the namespace of the page affected"
type"integer"
options
notnulltrue
default0
name"log_title"
comment"Key to the title of the page affected"
type"binary"
options
notnulltrue
default""
length255
name"log_page"
comment"Key to the page affected"
type"integer"
options
notnullfalse
unsignedtrue
name"log_comment_id"
comment"Key to comment_id. Comment summarizing the change."
type"bigint"
options
notnulltrue
unsignedtrue
name"log_params"
comment"LF separated list (old system) or serialized PHP array (new system)"
type"blob"
options
notnulltrue
length65530
name"log_deleted"
comment"rev_deleted for logs"
type"mwtinyint"
options
notnulltrue
unsignedtrue
default0
indexes
name"log_type_time"
comment"Special:Log type filter"
columns
"log_type"
"log_timestamp"
uniquefalse
name"log_actor_time"
comment"Special:Log performer filter"
columns
"log_actor"
"log_timestamp"
uniquefalse
name"log_page_time"
comment"Special:Log title filter, log extract"
columns
"log_namespace"
"log_title"
"log_timestamp"
uniquefalse
name"log_times"
comment"Special:Log unfiltered"
columns
"log_timestamp"
uniquefalse
name"log_actor_type_time"
comment"Special:Log filter by performer and type"
columns
"log_actor"
"log_type"
"log_timestamp"
uniquefalse
name"log_page_id_time"
comment"Apparently just used for a few maintenance pages (findMissingFiles.php, Flow). Could be removed?"
columns
"log_page"
"log_timestamp"
uniquefalse
name"log_type_action"
comment"Special:Log action filter"
columns
"log_type"
"log_action"
"log_timestamp"
uniquefalse
pk
"log_id"
name"uploadstash"
comment"Store information about newly uploaded files before they're moved into the actual filestore"
columns
name"us_id"
type"integer"
options
autoincrementtrue
unsignedtrue
notnulltrue
name"us_user"
comment"the user who uploaded the file."
type"integer"
options
unsignedtrue
notnulltrue
name"us_key"
comment"file key. this is how applications actually search for the file. this might go away, or become the primary key."
type"string"
options
notnulltrue
length255
name"us_orig_path"
comment"the original path"
type"string"
options
notnulltrue
length255
name"us_path"
comment"the temporary path at which the file is actually stored"
type"string"
options
notnulltrue
length255
name"us_source_type"
comment"which type of upload the file came from (sometimes)"
type"string"
options
notnullfalse
length50
name"us_timestamp"
comment"the date/time on which the file was added"
type"mwtimestamp"
options
notnulltrue
name"us_status"
type"string"
options
notnulltrue
length50
name"us_chunk_inx"
comment"chunk counter starts at 0, current offset is stored in us_size"
type"integer"
options
unsignedtrue
notnullfalse
name"us_props"
comment"Serialized file properties from FSFile::getProps()"
type"blob"
options
notnullfalse
length65530
name"us_size"
comment"file size in bytes"
type"bigint"
options
unsignedtrue
notnulltrue
name"us_sha1"
comment"this hash comes from FSFile::getSha1Base36(), and is 31 characters"
type"string"
options
notnulltrue
length31
name"us_mime"
type"string"
options
notnullfalse
length255
name"us_media_type"
comment"Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table"
type"mwenum"
options
notnullfalse
defaultnull
fixedtrue
CustomSchemaOptions
enum_values
"UNKNOWN"
"BITMAP"
"DRAWING"
"AUDIO"
"VIDEO"
"MULTIMEDIA"
"OFFICE"
"TEXT"
"EXECUTABLE"
"ARCHIVE"
"3D"
name"us_image_width"
comment"image-specific properties"
type"integer"
options
unsignedtrue
notnullfalse
name"us_image_height"
type"integer"
options
unsignedtrue
notnullfalse
name"us_image_bits"
type"smallint"
options
unsignedtrue
notnullfalse
indexes
name"us_user"
comment"sometimes there's a delete for all of a user's stuff."
columns
"us_user"
uniquefalse
name"us_key"
comment"pick out files by key, enforce key uniqueness"
columns
"us_key"
uniquetrue
name"us_timestamp"
comment"the abandoned upload cleanup script needs this"
columns
"us_timestamp"
uniquefalse
pk
"us_id"
name"filearchive"
comment"Record of deleted file data"
columns
name"fa_id"
comment"Unique row id"
type"integer"
options
autoincrementtrue
unsignedtrue
notnulltrue
name"fa_name"
comment"Original base filename; key to image.img_name, page.page_title, etc"
type"binary"
options
notnulltrue
default""
length255
name"fa_archive_name"
comment"Filename of archived file, if an old revision"
type"binary"
options
notnullfalse
default""
length255
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
notnullfalse
length16
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."
type"binary"
options
notnullfalse
default""
length64
name"fa_deleted_user"
type"integer"
options
notnullfalse
name"fa_deleted_timestamp"
type"mwtimestamp"
options
notnullfalse
name"fa_deleted_reason_id"
type"bigint"
options
unsignedtrue
notnulltrue
name"fa_size"
type"bigint"
options
unsignedtrue
notnullfalse
default0
name"fa_width"
type"integer"
options
notnullfalse
default0
name"fa_height"
type"integer"
options
notnullfalse
default0
name"fa_metadata"
type"blob"
options
notnullfalse
length16777215
name"fa_bits"
type"integer"
options
notnullfalse
default0
name"fa_media_type"
type"mwenum"
options
notnullfalse
defaultnull
CustomSchemaOptions
enum_values
"UNKNOWN"
"BITMAP"
"DRAWING"
"AUDIO"
"VIDEO"
"MULTIMEDIA"
"OFFICE"
"TEXT"
"EXECUTABLE"
"ARCHIVE"
"3D"
name"fa_major_mime"
type"mwenum"
options
notnullfalse
default"unknown"
CustomSchemaOptions
enum_values
"unknown"
"application"
"audio"
"image"
"text"
"video"
"message"
"model"
"multipart"
"chemical"
name"fa_minor_mime"
type"binary"
options
notnullfalse
default"unknown"
length100
name"fa_description_id"
type"bigint"
options
unsignedtrue
notnulltrue
name"fa_actor"
type"bigint"
options
unsignedtrue
notnulltrue
name"fa_timestamp"
type"mwtimestamp"
options
notnullfalse
name"fa_deleted"
comment"Visibility of deleted revisions, bitfield"
type"mwtinyint"
options
unsignedtrue
notnulltrue
default0
name"fa_sha1"
comment"sha1 hash of file content"
type"binary"
options
notnulltrue
default""
length32
indexes
name"fa_name"
comment"pick out by image name"
columns
"fa_name"
"fa_timestamp"
uniquefalse
name"fa_storage_group"
comment"pick out dupe files"
columns
"fa_storage_group"
"fa_storage_key"
uniquefalse
name"fa_deleted_timestamp"
comment"sort by deletion time"
columns
"fa_deleted_timestamp"
uniquefalse
name"fa_actor_timestamp"
comment"sort by uploader"
columns
"fa_actor"
"fa_timestamp"
uniquefalse
name"fa_sha1"
comment"find file by sha1, 10 bytes will be enough for hashes to be indexed"
columns
"fa_sha1"
uniquefalse
options
lengths
10
pk
"fa_id"
name"text"
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. This table can also hold metadata of files if the metadata is too big to store in img_metadata, oi_metadata or fa_metadata."
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. Also img_metadata, oi_metadata or fa_metadata can refer to this column when being used to store file metadata."
type"integer"
options
autoincrementtrue
unsignedtrue
notnulltrue
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
notnulltrue
length16777215
name"old_flags"
comment"Comma-separated list of flags: * gzip: text is compressed with PHP's gzdeflate() function. * 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). * 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. * 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."
type"blob"
options
notnulltrue
length255
indexes
Empty array
pk
"old_id"
name"oldimage"
comment"Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time."
columns
name"oi_name"
comment"Base filename: key to image.img_name"
type"binary"
options
notnulltrue
default""
length255
name"oi_archive_name"
comment"Filename of the archived file. This is generally a timestamp and '!' prepended to the base name."
type"binary"
options
notnulltrue
default""
length255
name"oi_size"
type"bigint"
options
unsignedtrue
notnulltrue
default0
name"oi_width"
type"integer"
options
notnulltrue
default0
name"oi_height"
type"integer"
options
notnulltrue
default0
name"oi_bits"
type"integer"
options
notnulltrue
default0
name"oi_description_id"
type"bigint"
options
unsignedtrue
notnulltrue
name"oi_actor"
type"bigint"
options
unsignedtrue
notnulltrue
name"oi_timestamp"
type"mwtimestamp"
options
notnulltrue
name"oi_metadata"
type"blob"
options
notnulltrue
length16777215
name"oi_media_type"
type"mwenum"
options
notnullfalse
defaultnull
CustomSchemaOptions
enum_values
"UNKNOWN"
"BITMAP"
"DRAWING"
"AUDIO"
"VIDEO"
"MULTIMEDIA"
"OFFICE"
"TEXT"
"EXECUTABLE"
"ARCHIVE"
"3D"
name"oi_major_mime"
type"mwenum"
options
notnulltrue
default"unknown"
CustomSchemaOptions
enum_values
"unknown"
"application"
"audio"
"image"
"text"
"video"
"message"
"model"
"multipart"
"chemical"
name"oi_minor_mime"
type"binary"
options
notnulltrue
default"unknown"
length100
name"oi_deleted"
type"mwtinyint"
options
unsignedtrue
notnulltrue
default0
name"oi_sha1"
type"binary"
options
notnulltrue
default""
length32
indexes
name"oi_actor_timestamp"
columns
"oi_actor"
"oi_timestamp"
uniquefalse
name"oi_name_timestamp"
columns
"oi_name"
"oi_timestamp"
uniquefalse
name"oi_name_archive_name"
comment"oi_archive_name truncated to 14 to avoid key length overflow"
columns
"oi_name"
"oi_archive_name"
uniquefalse
options
lengths
null
14
name"oi_sha1"
columns
"oi_sha1"
uniquefalse
options
lengths
10
name"oi_timestamp"
comment"Used by Special:ListFiles"
columns
"oi_timestamp"
uniquefalse
name"objectcache"
comment"For a few generic cache operations if not using Memcached"
columns
name"keyname"
type"binary"
options
notnulltrue
default""
length255
name"value"
type"blob"
options
notnullfalse
length16777215
name"exptime"
type"mwtimestamp"
options
notnulltrue
name"modtoken"
type"string"
options
notnulltrue
length17
default"00000000000000000"
name"flags"
type"integer"
options
notnullfalse
unsignedtrue
defaultnull
indexes
name"exptime"
columns
"exptime"
uniquefalse
pk
"keyname"
name"ipblocks"
comment"Blocks against user accounts, IP addresses and IP ranges."
columns
name"ipb_id"
comment"Primary key, introduced for privacy."
type"integer"
options
autoincrementtrue
notnulltrue
unsignedtrue
name"ipb_address"
comment"Blocked IP address in dotted-quad form or user name."
type"blob"
options
notnulltrue
length255
name"ipb_user"
comment"Blocked user ID or 0 for IP blocks."
type"integer"
options
unsignedtrue
notnulltrue
default0
name"ipb_by_actor"
comment"Actor who made the block."
type"bigint"
options
unsignedtrue
notnulltrue
name"ipb_reason_id"
comment"Key to comment_id. Text comment made by blocker."
type"bigint"
options
unsignedtrue
notnulltrue
name"ipb_timestamp"
comment"Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically."
type"mwtimestamp"
options
notnulltrue
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
notnulltrue
length1
default0
name"ipb_anon_only"
comment"If set to 1, block applies only to logged-out users and temporary users."
type"mwtinyint"
options
notnulltrue
length1
default0
name"ipb_create_account"
comment"Block prevents account creation from matching IP addresses"
type"mwtinyint"
options
notnulltrue
length1
default1
name"ipb_enable_autoblock"
comment"Block triggers autoblocks"
type"mwtinyint"
options
notnulltrue
length1
default1
name"ipb_expiry"
comment"Time at which the block will expire. May be "infinity""
type"mwtimestamp"
options
notnulltrue
CustomSchemaOptions
allowInfinitetrue
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
notnulltrue
length255
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
notnulltrue
length255
name"ipb_deleted"
comment"Flag for entries hidden from users and Sysops"
type"mwtinyint"
options
notnulltrue
length1
default0
name"ipb_block_email"
comment"Block prevents user from accessing Special:Emailuser"
type"mwtinyint"
options
notnulltrue
length1
default0
name"ipb_allow_usertalk"
comment"Block allows user to edit their own talk page"
type"mwtinyint"
options
notnulltrue
length1
default0
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. Due to a bug this could be 0, which should be handled as null."
type"integer"
options
notnullfalse
unsignedtrue
defaultnull
name"ipb_sitewide"
comment"Block user from editing any page on the site (other than their own user talk page)."
type"mwtinyint"
options
notnulltrue
length1
default1
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"
uniquetrue
options
lengths
255
null
null
name"ipb_user"
comment"For querying whether a logged-in user is blocked"
columns
"ipb_user"
uniquefalse
name"ipb_range"
comment"For querying whether an IP address is in any range"
columns
"ipb_range_start"
"ipb_range_end"
uniquefalse
options
lengths
8
8
name"ipb_timestamp"
comment"Index for Special:BlockList"
columns
"ipb_timestamp"
uniquefalse
name"ipb_expiry"
comment"Index for table pruning"
columns
"ipb_expiry"
uniquefalse
name"ipb_parent_block_id"
comment"Index for removing autoblocks when a parent block is removed"
columns
"ipb_parent_block_id"
uniquefalse
pk
"ipb_id"
name"block"
comment"Blocks against user accounts, IP addresses and IP ranges."
columns
name"bl_id"
comment"Primary key."
type"integer"
options
autoincrementtrue
notnulltrue
unsignedtrue
name"bl_target"
comment"The block target. Foreign key to block_target.bt_id."
type"integer"
options
notnulltrue
unsignedtrue
name"bl_by_actor"
comment"Actor who made the block."
type"bigint"
options
unsignedtrue
notnulltrue
name"bl_reason_id"
comment"Key to comment_id. Text comment made by blocker."
type"bigint"
options
unsignedtrue
notnulltrue
name"bl_timestamp"
comment"Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically."
type"mwtimestamp"
options
notnulltrue
name"bl_anon_only"
comment"If set to 1, block applies only to logged-out users and temporary users."
type"mwtinyint"
options
notnulltrue
length1
default0
name"bl_create_account"
comment"Block prevents account creation from matching IP addresses"
type"mwtinyint"
options
notnulltrue
length1
default1
name"bl_enable_autoblock"
comment"Block triggers autoblocks"
type"mwtinyint"
options
notnulltrue
length1
default1
name"bl_expiry"
comment"Time at which the block will expire. May be "infinity""
type"mwtimestamp"
options
notnulltrue
CustomSchemaOptions
allowInfinitetrue
name"bl_deleted"
comment"If true, this block causes the username to be hidden, and the expiry must be infinite. This is denormalized into rev_deleted and the other deleted bitfields (T346716)."
type"mwtinyint"
options
notnulltrue
length1
default0
name"bl_block_email"
comment"Block prevents user from accessing Special:Emailuser"
type"mwtinyint"
options
notnulltrue
length1
default0
name"bl_allow_usertalk"
comment"Block allows user to edit their own talk page"
type"mwtinyint"
options
notnulltrue
length1
default0
name"bl_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
notnullfalse
unsignedtrue
defaultnull
name"bl_sitewide"
comment"Block user from editing any page on the site (other than their own user talk page)."
type"mwtinyint"
options
notnulltrue
length1
default1
indexes
name"bl_timestamp"
comment"Index for Special:BlockList"
columns
"bl_timestamp"
uniquefalse
name"bl_target"
comment"For searching by target"
columns
"bl_target"
uniquefalse
name"bl_expiry"
comment"Index for table pruning"
columns
"bl_expiry"
uniquefalse
name"bl_parent_block_id"
comment"Index for removing autoblocks when a parent block is removed"
columns
"bl_parent_block_id"
uniquefalse
pk
"bl_id"
name"block_target"
comment"The targets of blocks"
columns
name"bt_id"
comment"Primary key."
type"integer"
options
autoincrementtrue
notnulltrue
unsignedtrue
name"bt_address"
comment"Blocked IP address or range in dotted-quad form, or null for a user block. If bt_auto is 1 then the address is private."
type"blob"
options
notnullfalse
length255
name"bt_user"
comment"Blocked user ID or null for IP blocks."
type"integer"
options
notnullfalse
unsignedtrue
name"bt_user_text"
comment"The name of the blocked user, or null for IP blocks. For Special:BlockList sorting (T48013)."
type"binary"
options
notnullfalse
length255
name"bt_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
notnulltrue
length1
default0
name"bt_range_start"
comment"Start of an address range, in hexadecimal. Null for single-IP and user blocks."
type"blob"
options
notnullfalse
length255
name"bt_range_end"
comment"End of an address range, in hexadecimal. Null for single-IP and user blocks."
type"blob"
options
notnullfalse
length255
name"bt_ip_hex"
comment"If the block is for a single IP, this is the IP address in hexadecimal. If the block is for a range, the start of the range in hexadecimal, identical to bt_range_start."
type"blob"
options
notnullfalse
length255
name"bt_count"
comment"The number of block rows associated with this target."
type"integer"
options
notnulltrue
default0
indexes
name"bt_address"
comment"For finding single IP blocks and for Special:BlockList searching."
columns
"bt_address"
options
lengths
42
uniquefalse
name"bt_ip_user_text"
comment"For sorting Special:BlockList by target (T48013)"
columns
"bt_ip_hex"
"bt_user_text"
options
lengths
35
255
uniquefalse
name"bt_range"
comment"For querying whether an IP address is in any range"
columns
"bt_range_start"
"bt_range_end"
options
lengths
35
35
uniquefalse
name"bt_user"
comment"For querying whether a logged-in user is blocked"
columns
"bt_user"
uniquefalse
pk
"bt_id"
name"image"
comment"Uploaded images and other files."
columns
name"img_name"
comment"Filename. This is also the title of the associated description page, which will be in namespace 6 (NS_FILE)."
type"binary"
options
notnulltrue
default""
length255
name"img_size"
comment"File size in bytes."
type"bigint"
options
unsignedtrue
notnulltrue
default0
name"img_width"
comment"For images, width in pixels."
type"integer"
options
notnulltrue
default0
name"img_height"
comment"For images, height in pixels."
type"integer"
options
notnulltrue
default0
name"img_metadata"
comment"Extracted Exif metadata stored as a json array (new system) or serialized PHP array (old system). The json array can contain an address in the text table or external storage."
type"blob"
options
notnulltrue
length16777215
name"img_bits"
comment"For images, bits per pixel if known."
type"integer"
options
notnulltrue
default0
name"img_media_type"
comment"Media type as defined by the MEDIATYPE_xxx constants"
type"mwenum"
options
notnullfalse
defaultnull
CustomSchemaOptions
enum_values
"UNKNOWN"
"BITMAP"
"DRAWING"
"AUDIO"
"VIDEO"
"MULTIMEDIA"
"OFFICE"
"TEXT"
"EXECUTABLE"
"ARCHIVE"
"3D"
name"img_major_mime"
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"
type"mwenum"
options
notnulltrue
default"unknown"
CustomSchemaOptions
enum_values
"unknown"
"application"
"audio"
"image"
"text"
"video"
"message"
"model"
"multipart"
"chemical"
name"img_minor_mime"
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
notnulltrue
default"unknown"
length100
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
unsignedtrue
notnulltrue
name"img_actor"
comment"actor_id of the uploader."
type"bigint"
options
unsignedtrue
notnulltrue
name"img_timestamp"
comment"Time of the upload."
type"mwtimestamp"
options
notnulltrue
name"img_sha1"
comment"SHA-1 content hash in base-36"
type"binary"
options
notnulltrue
default""
length32
indexes
name"img_actor_timestamp"
comment"Used by Special:Newimages and ApiQueryAllImages"
columns
"img_actor"
"img_timestamp"
uniquefalse
name"img_size"
comment"Used by Special:ListFiles for sort-by-size"
columns
"img_size"
uniquefalse
name"img_timestamp"
comment"Used by Special:Newimages and Special:ListFiles"
columns
"img_timestamp"
uniquefalse
name"img_sha1"
comment"Used in API and duplicate search"
columns
"img_sha1"
uniquefalse
options
lengths
10
name"img_media_mime"
comment"Used to get media of one type"
columns
"img_media_type"
"img_major_mime"
"img_minor_mime"
uniquefalse
pk
"img_name"
name"recentchanges"
comment"Primarily a summary table for Special:RecentChanges, this table contains some additional info on edits from the last few days"
columns
name"rc_id"
type"integer"
options
autoincrementtrue
unsignedtrue
notnulltrue
name"rc_timestamp"
type"mwtimestamp"
options
notnulltrue
name"rc_actor"
comment"As in revision"
type"bigint"
options
unsignedtrue
notnulltrue
name"rc_namespace"
comment"When pages are renamed, their RC entries do _not_ change."
type"integer"
options
notnulltrue
default0
name"rc_title"
type"binary"
options
notnulltrue
default""
length255
name"rc_comment_id"
comment"as in revision..."
type"bigint"
options
unsignedtrue
notnulltrue
name"rc_minor"
type"mwtinyint"
options
unsignedtrue
notnulltrue
default0
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
unsignedtrue
notnulltrue
default0
name"rc_new"
comment"Set if this change corresponds to a page creation"
type"mwtinyint"
options
unsignedtrue
notnulltrue
default0
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
unsignedtrue
notnulltrue
default0
name"rc_this_oldid"
comment"rev_id of the given revision"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"rc_last_oldid"
comment"rev_id of the prior revision, for generating diff links."
type"integer"
options
unsignedtrue
notnulltrue
default0
name"rc_type"
comment"The type of change entry (RC_EDIT,RC_NEW,RC_LOG,RC_EXTERNAL)"
type"mwtinyint"
options
unsignedtrue
notnulltrue
default0
name"rc_source"
comment"The source of the change entry (replaces rc_type) default of '' is temporary, needed for initial migration"
type"binary"
options
notnulltrue
default""
length16
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
unsignedtrue
notnulltrue
default0
name"rc_ip"
comment"Recorded IP address the edit was made from, if the $wgPutIPinRC option is enabled."
type"binary"
options
notnulltrue
default""
length40
name"rc_old_len"
comment"Text length in characters before the edit"
type"integer"
options
notnullfalse
name"rc_new_len"
comment"Text length in characters after the edit"
type"integer"
options
notnullfalse
name"rc_deleted"
comment"Visibility of recent changes items, bitfield"
type"mwtinyint"
options
unsignedtrue
notnulltrue
default0
name"rc_logid"
comment"Value corresponding to log_id, specific log entries"
type"integer"
options
unsignedtrue
notnulltrue
default0
name"rc_log_type"
comment"Store log type info here, or null"
type"binary"
options
notnullfalse
defaultnull
length255
name"rc_log_action"
comment"Store log action or null"
type"binary"
options
notnullfalse
defaultnull
length255
name"rc_params"
comment"Log params"
type"blob"
options
notnullfalse
length65535
indexes
name"rc_timestamp"
comment"Special:Recentchanges"
columns
"rc_timestamp"
uniquefalse
name"rc_namespace_title_timestamp"
comment"Special:Watchlist"
columns
"rc_namespace"
"rc_title"
"rc_timestamp"
uniquefalse
name"rc_cur_id"
comment"Special:Recentchangeslinked when finding changes in pages linked from a page"
columns
"rc_cur_id"
uniquefalse
name"rc_new_name_timestamp"
comment"Special:Newpages"
columns
"rc_new"
"rc_namespace"
"rc_timestamp"
uniquefalse
name"rc_ip"
comment"Blank unless $wgPutIPinRC=true (false at WMF), possibly used by extensions, but mostly replaced by CheckUser."
columns
"rc_ip"
uniquefalse
name"rc_ns_actor"
comment"Probably intended for Special:NewPages namespace filter"
columns
"rc_namespace"
"rc_actor"
uniquefalse
name"rc_actor"
comment"SiteStats active user count, Special:ActiveUsers, Special:NewPages user filter"
columns
"rc_actor"
"rc_timestamp"
uniquefalse
name"rc_name_type_patrolled_timestamp"
comment"ApiQueryRecentChanges (T140108)"
columns
"rc_namespace"
"rc_type"
"rc_patrolled"
"rc_timestamp"
uniquefalse
name"rc_this_oldid"
comment"Article.php and friends (T139012)"
columns
"rc_this_oldid"
uniquefalse
pk
"rc_id"
name"archive"
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
autoincrementtrue
unsignedtrue
notnulltrue
name"ar_namespace"
comment"Copied from page_namespace"
type"integer"
options
notnulltrue
default0
name"ar_title"
comment"Copied from page_title"
type"binary"
options
notnulltrue
default""
length255
name"ar_comment_id"
comment"Basic revision stuff."
type"bigint"
options
unsignedtrue
notnulltrue
name"ar_actor"
comment"Basic revision stuff."
type"bigint"
options
unsignedtrue
notnulltrue
name"ar_timestamp"
comment"Basic revision stuff."
type"mwtimestamp"
options
notnulltrue
name"ar_minor_edit"
comment"Basic revision stuff."
type"mwtinyint"
options
notnulltrue
default0
name"ar_rev_id"
comment"Copied from rev_id."
type"integer"
options
unsignedtrue
notnulltrue
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
unsignedtrue
notnulltrue
default0
name"ar_len"
comment"Copied from rev_len, length of this revision in bytes. @since 1.10"
type"integer"
options
unsignedtrue
notnullfalse
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
unsignedtrue
notnullfalse
name"ar_parent_id"
comment"Copied from rev_parent_id. @since 1.13"
type"integer"
options
unsignedtrue
notnullfalse
defaultnull
name"ar_sha1"
comment"Copied from rev_sha1, SHA-1 text content hash in base-36 @since 1.19"
type"binary"
options
notnulltrue
default""
length32
indexes
name"ar_name_title_timestamp"
comment"Index for Special:Undelete to page through deleted revisions"
columns
"ar_namespace"
"ar_title"
"ar_timestamp"
uniquefalse
name"ar_actor_timestamp"
comment"Index for Special:DeletedContributions"
columns
"ar_actor"
"ar_timestamp"
uniquefalse
name"ar_revid_uniq"
comment"Index for linking archive rows with tables that normally link with revision rows, such as change_tag."
columns
"ar_rev_id"
uniquetrue
pk
"ar_id"
name"page"
comment"Core of the wiki: each page has an entry here which identifies it by title and contains some essential metadata."
columns
name"page_id"
comment"Unique identifier number. The page_id will be preserved across edits and rename operations, but not deletions and recreations."
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"page_namespace"
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
notnulltrue
name"page_title"
comment"The rest of the title, as text. Spaces are transformed into underscores in title storage."
type"binary"
options
notnulltrue
length255
name"page_is_redirect"
comment"1 indicates the article is a redirect. If so, there is a row in the `redirect` table with rd_from=page_id, which contains the redirect target."
type"mwtinyint"
options
notnulltrue
unsignedtrue
default0
name"page_is_new"
comment"1 indicates this is a new entry, with only one edit. Not all pages with one edit are new pages."
type"mwtinyint"
options
notnulltrue
unsignedtrue
default0
name"page_random"
comment"Random value between 0 and 1, used for Special:Randompage"
type"float"
options
notnulltrue
unsignedtrue
CustomSchemaOptions
doublePrecisiontrue
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
notnulltrue
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
notnullfalse
defaultnull
CustomSchemaOptions
allowInfinitetrue
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
unsignedtrue
notnulltrue
name"page_len"
comment"Uncompressed length in bytes of the page's current source text."
type"integer"
options
unsignedtrue
notnulltrue
name"page_content_model"
comment"content model, see CONTENT_MODEL_XXX constants"
type"binary"
options
length32
notnullfalse
name"page_lang"
comment"Page content language"
type"binary"
options
length35
notnullfalse
indexes
name"page_name_title"
columns
"page_namespace"
"page_title"
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."
uniquetrue
name"page_random"
columns
"page_random"
comment"Index for Special:Random"
uniquefalse
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."
uniquefalse
name"page_redirect_namespace_len"
columns
"page_is_redirect"
"page_namespace"
"page_len"
comment"The index for Special:Shortpages and Special:Longpages. Also SiteStats::articles() in 'comma' counting mode, MessageCache::loadFromDB()."
uniquefalse
pk
"page_id"
name"user"
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"
columns
name"user_id"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"user_name"
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."
type"binary"
options
notnulltrue
length255
default""
name"user_real_name"
comment"Optional 'real name' to be displayed in credit listings"
type"binary"
options
notnulltrue
length255
default""
name"user_password"
comment"Password hashes"
type"blob"
options
notnulltrue
length255
name"user_newpassword"
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
notnulltrue
length255
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
notnullfalse
name"user_email"
comment"User email. Non public info."
type"text"
options
notnulltrue
length255
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
notnulltrue
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)"
type"binary"
options
notnulltrue
default""
length32
fixedtrue
name"user_email_authenticated"
comment"Initially NULL; when a user's e-mail address has been validated by returning with a mailed token, this is set to the current timestamp."
type"mwtimestamp"
options
notnullfalse
name"user_email_token"
comment"Randomly generated token created when the e-mail address is set and a confirmation test mail sent."
type"binary"
options
notnullfalse
length32
fixedtrue
name"user_email_token_expires"
comment"Expiration date for the user_email_token."
type"mwtimestamp"
options
notnullfalse
name"user_registration"
comment"Timestamp of account registration. Accounts predating this schema addition may contain NULL."
type"mwtimestamp"
options
notnullfalse
name"user_editcount"
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."
type"integer"
options
notnullfalse
unsignedtrue
name"user_password_expires"
comment"Expiration date for user password."
type"mwtimestamp"
options
notnullfalse
CustomSchemaOptions
allowInfinitetrue
name"user_is_temp"
comment"This exists to allow temporary users to be identified from the database only, by external applications, and is not for use within MediaWiki (see T333223). A boolean value representing whether the user is a temporary user. Zero if any type of user other than a temporary user."
type"mwtinyint"
options
notnulltrue
length1
default0
indexes
name"user_name"
columns
"user_name"
uniquetrue
name"user_email_token"
columns
"user_email_token"
uniquefalse
name"user_email"
columns
"user_email"
uniquefalse
options
lengths
50
null
null
pk
"user_id"
name"user_autocreate_serial"
comment"Table for sequential name generation for auto-created temporary users"
columns
name"uas_shard"
comment"The segment of ID space, ID mod N, referred to by this row"
type"integer"
options
unsignedtrue
notnulltrue
name"uas_year"
comment"The year to which this row belongs, if $wgAutoCreateTempUser['serialProvider']['useYear'] is true."
type"smallint"
options
unsignedtrue
notnulltrue
name"uas_value"
comment"The maximum allocated ID value"
type"integer"
options
unsignedtrue
notnulltrue
indexes
Empty array
pk
"uas_shard"
"uas_year"
name"revision"
comment"Every edit of a page creates also a revision row. This stores metadata about the revision, and a reference to the text storage backend."
columns
name"rev_id"
comment"Unique ID to identify each revision"
type"integer"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"rev_page"
comment"Key to page_id. This should never be invalid"
type"integer"
options
unsignedtrue
notnulltrue
name"rev_comment_id"
comment"Key to comment.comment_id. Comment summarizing the change"
type"bigint"
options
unsignedtrue
notnulltrue
default0
name"rev_actor"
comment"Key to actor.actor_id of the user or IP who made this edit"
type"bigint"
options
unsignedtrue
notnulltrue
default0
name"rev_timestamp"
comment"Timestamp of when revision was created"
type"mwtimestamp"
options
notnulltrue
name"rev_minor_edit"
comment"Records whether the user marked the 'minor edit' checkbox. Many automated edits are marked as minor"
type"mwtinyint"
options
notnulltrue
unsignedtrue
default0
name"rev_deleted"
comment"Restrictions on who can access this revision"
type"mwtinyint"
options
notnulltrue
unsignedtrue
default0
name"rev_len"
comment"Length of this revision in bytes"
type"integer"
options
unsignedtrue
notnullfalse
name"rev_parent_id"
comment"Key to revision.rev_id. This field is used to add support for a tree structure (The Adjacency List Model)"
type"integer"
options
unsignedtrue
notnullfalse
name"rev_sha1"
comment"SHA-1 text content hash in base-36"
type"binary"
options
length32
notnulltrue
default""
indexes
name"rev_timestamp"
columns
"rev_timestamp"
comment"Used by ApiQueryAllRevisions"
uniquefalse
name"rev_page_timestamp"
columns
"rev_page"
"rev_timestamp"
comment"History index"
uniquefalse
name"rev_actor_timestamp"
columns
"rev_actor"
"rev_timestamp"
"rev_id"
comment"User contributions index"
uniquefalse
name"rev_page_actor_timestamp"
columns
"rev_page"
"rev_actor"
"rev_timestamp"
comment"Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified"
uniquefalse
pk
"rev_id"
name"searchindex"
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."
columns
name"si_page"
comment"Key to page_id"
type"integer"
options
unsignedtrue
notnulltrue
name"si_title"
comment"Munged version of title"
type"string"
options
length255
notnulltrue
default""
name"si_text"
comment"Munged version of body text"
type"text"
options
notnulltrue
length16777215
indexes
name"si_page"
columns
"si_page"
uniquetrue
name"si_title"
columns
"si_title"
uniquefalse
flags
"fulltext"
name"si_text"
columns
"si_text"
uniquefalse
flags
"fulltext"
pk
Empty array
table_options
"ENGINE=MyISAM"
"DEFAULT CHARSET=utf8"
name"linktarget"
comment"Holds immutable records of link targets, used mostly for links tables."
columns
name"lt_id"
comment"primary key"
type"bigint"
options
unsignedtrue
notnulltrue
autoincrementtrue
name"lt_namespace"
comment"Namespace of the link target"
type"integer"
options
notnulltrue
name"lt_title"
comment"Text part of link target excluding namespace"
type"binary"
options
length255
notnulltrue
indexes
name"lt_namespace_title"
columns
"lt_namespace"
"lt_title"
uniquetrue
pk
"lt_id"