wiki.techinc.nl/maintenance/tables.json

1283 lines
39 KiB
JSON
Raw Normal View History

[
{
"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": { "length": 32, "notnull": true }
},
{
"name": "si_key",
"comment": "local key value, ie 'en' or 'wiktionary'",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "si_site",
"comment": "Key on site.site_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{ "name": "site_ids_site", "columns": [ "si_site" ], "unique": false },
{ "name": "site_ids_key", "columns": [ "si_key" ], "unique": false }
],
"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": { "length": 255, "notnull": true }
},
{
"name": "ul_value",
"type": "blob",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [],
"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": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "actor_user",
"comment": "Key to user.user_id, or NULL for anonymous edits",
"type": "integer",
"options": { "unsigned": true, "notnull": false }
},
{
"name": "actor_name",
"comment": "Text username or IP address",
"type": "binary",
"options": { "length": 255, "notnull": true }
}
],
"indexes": [
{ "name": "actor_user", "columns": [ "actor_user" ], "unique": true },
{ "name": "actor_name", "columns": [ "actor_name" ], "unique": true }
],
"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": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "ufg_group",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
}
],
"indexes": [],
"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": { "unsigned": true, "notnull": true }
},
{
"name": "bp_app_id",
"comment": "Application identifier.",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "bp_password",
"comment": "Password hashes, like user.user_password.",
"type": "blob",
"options": { "length": 255, "notnull": true }
},
{
"name": "bp_token",
"comment": "Like user.user_token",
"type": "binary",
"options": { "length": 32, "notnull": true, "default": "", "fixed": true }
},
{
"name": "bp_restrictions",
"comment": "JSON blob for MWRestrictions",
"type": "blob",
"options": { "length": 65535, "notnull": true }
},
{
"name": "bp_grants",
"comment": "Grants allowed to the account when authenticated with this bot-password",
"type": "blob",
"options": { "length": 65535, "notnull": true }
}
],
"indexes": [],
"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": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "comment_hash",
"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.",
"type": "blob",
"options": { "length": 65535, "notnull": false }
}
],
"indexes": [
{ "name": "comment_hash", "columns": [ "comment_hash" ], "unique": false }
],
"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": { "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.",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
}
],
"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",
"unique": false
}
],
"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": { "unsigned": true, "notnull": true }
},
{
"name": "ss_total_edits",
"comment": "Total number of edits performed.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_good_articles",
"comment": "See SiteStatsInit::articles().",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_total_pages",
"comment": "Total pages, theoretically equal to SELECT COUNT(*) FROM page.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_users",
"comment": "Number of users, theoretically equal to SELECT COUNT(*) FROM user.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_active_users",
"comment": "Number of users that still edit.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_images",
"comment": "Number of images, equivalent to SELECT COUNT(*) FROM image.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
}
],
"indexes": [],
"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 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.",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "up_value",
"comment": "Property value as a string.",
"type": "blob",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [
{ "name": "user_properties_property", "columns": [ "up_property" ], "unique": false }
],
"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": { "length": 32, "notnull": true }
},
{
"name": "ls_value",
"comment": "The value of the ID",
"type": "string",
"options": { "length": 255, "notnull": true }
},
{
"name": "ls_log_id",
"comment": "Key to log_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
}
],
"indexes": [
{ "name": "ls_log_id", "columns": [ "ls_log_id" ], "unique": false }
],
"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": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "ct_rc_id",
"comment": "RCID for the change",
"type": "integer",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ct_log_id",
"comment": "LOGID for the change",
"type": "integer",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ct_rev_id",
"comment": "REVID for the change",
"type": "integer",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ct_params",
"comment": "Parameters for the tag; used by some extensions",
"type": "blob",
"options": { "length": 65530, "notnull": false, "default": null }
},
{
"name": "ct_tag_id",
"comment": "Foreign key to change_tag_def row",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{ "name": "change_tag_rc_tag_id", "columns": [ "ct_rc_id", "ct_tag_id" ], "unique": true },
{ "name": "change_tag_log_tag_id", "columns": [ "ct_log_id", "ct_tag_id" ], "unique": true },
{ "name": "change_tag_rev_tag_id", "columns": [ "ct_rev_id", "ct_tag_id" ], "unique": true },
{
"name": "change_tag_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" ],
"unique": false
}
],
"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": { "notnull": true, "unsigned": true, "autoincrement": true }
},
{
"name": "content_size",
"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.",
"type": "smallint",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "content_address",
"comment": "URL-like address of the content blob",
"type": "binary",
"options": { "notnull": true, "length": 255 }
}
],
"indexes": [],
"pk": [ "content_id" ]
},
{
"name": "l10n_cache",
"comment": "Table for storing localisation data",
"columns": [
{
"name": "lc_lang",
"comment": "Language code",
"type": "binary",
"options": { "notnull": true, "length": 35 }
},
{
"name": "lc_key",
"comment": "Cache key",
"type": "string",
"options": { "notnull": true, "length": 255 }
},
{
"name": "lc_value",
"comment": "Value",
"type": "blob",
"options": { "notnull": true, "length": 16777215 }
}
],
"indexes": [],
"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": { "notnull": true, "length": 255 }
},
{
"name": "md_skin",
"comment": "Module context vary (includes skin and language; called \"md_skin\" for legacy reasons)",
"type": "binary",
"options": { "notnull": true, "length": 32 }
},
{
"name": "md_deps",
"comment": "JSON blob with file dependencies",
"type": "blob",
"options": { "notnull": true, "length": 16777215 }
}
],
"indexes": [],
"pk": [ "md_module", "md_skin" ]
},
{
"name": "redirect",
"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",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "rd_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "rd_title",
"type": "binary",
"options": { "notnull": true, "length": 255, "default": "" }
},
{
"name": "rd_interwiki",
"type": "string",
"options": { "notnull": false, "length": 32, "default": null }
},
{
"name": "rd_fragment",
"type": "binary",
"options": { "notnull": false, "length": 255, "default": null }
}
],
"indexes": [
{ "name": "rd_ns_title", "columns": [ "rd_namespace", "rd_title", "rd_from" ], "unique": false }
],
"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": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "pl_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "pl_title",
"type": "binary",
"options": { "notnull": true, "length": 255, "default": "" }
},
{
"name": "pl_from_namespace",
"type": "integer",
"comment": "Namespace for pl_from page",
"options": { "notnull": true, "default": 0 }
}
],
"indexes": [
{
"name": "pl_namespace",
"columns": [ "pl_namespace", "pl_title", "pl_from" ],
"comment": "Reverse index, for Special:Whatlinkshere",
"unique": false
},
{
"name": "pl_backlinks_namespace",
"columns": [ "pl_from_namespace", "pl_namespace", "pl_title", "pl_from" ],
"comment": "Index for Special:Whatlinkshere with namespace filter",
"unique": false
}
],
"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": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "tl_from_namespace",
"type": "integer",
"comment": "Namespace for this page",
"options": { "notnull": true, "default": 0 }
},
{
"name": "tl_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "tl_title",
"type": "binary",
"options": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "tl_namespace",
"columns": [ "tl_namespace", "tl_title", "tl_from" ],
"comment": "Reverse index, for Special:Whatlinkshere",
"unique": false
},
{
"name": "tl_backlinks_namespace",
"columns": [ "tl_from_namespace", "tl_namespace", "tl_title", "tl_from" ],
"comment": "Index for Special:Whatlinkshere with namespace filter",
"unique": false
}
],
"pk": [ "tl_from", "tl_namespace", "tl_title" ]
},
{
"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": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "il_from_namespace",
"type": "integer",
"comment": "Namespace for this page",
"options": { "notnull": true, "default": 0 }
},
{
"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": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "il_to",
"columns": [ "il_to", "il_from" ],
"comment": "Reverse index, for Special:Whatlinkshere and file description page local usage",
"unique": false
},
{
"name": "il_backlinks_namespace",
"columns": [ "il_from_namespace", "il_to", "il_from" ],
"comment": "Index for Special:Whatlinkshere with namespace filter",
"unique": false
}
],
"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": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "ll_lang",
"type": "binary",
"comment": "Language code of the target",
"options": { "notnull": true, "length": 35, "default": "" }
},
{
"name": "ll_title",
"type": "binary",
"comment": "Title of the target, including namespace",
"options": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "ll_lang",
"columns": [ "ll_lang", "ll_title" ],
"comment": "Index for ApiQueryLangbacklinks",
"unique": false
}
],
"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": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "iwl_prefix",
"type": "binary",
"comment": "Interwiki prefix code of the target",
"options": { "notnull": true, "length": 20, "default": "" }
},
{
"name": "iwl_title",
"type": "binary",
"comment": "Title of the target, including namespace",
"options": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "iwl_prefix_title_from",
"columns": [ "iwl_prefix", "iwl_title", "iwl_from" ],
"comment": "Index for ApiQueryIWBacklinks",
"unique": false
},
{
"name": "iwl_prefix_from_title",
"columns": [ "iwl_prefix", "iwl_from", "iwl_title" ],
"comment": "Index for ApiQueryIWLinks",
"unique": false
}
],
"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": { "notnull": true, "unsigned": true, "autoincrement": true }
},
{
"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": { "notnull": true, "length": 255 }
},
{
"name": "cat_pages",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "cat_subcats",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "cat_files",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
}
],
"indexes": [
{
"name": "cat_title",
"columns": [ "cat_title" ],
"unique": true
},
{
"name": "cat_pages",
"columns": [ "cat_pages" ],
"comment": "For Special:Mostlinkedcategories",
"unique": false
}
],
"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": { "notnull": true, "unsigned": true }
},
{
"name": "we_expiry",
"type": "mwtimestamp",
"comment": "Expiry time",
"options": { "notnull": true }
}
],
"indexes": [
{
"name": "we_expiry",
"columns": [ "we_expiry" ],
"unique": false
}
],
"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": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "ctd_name",
"comment": "Symbolic name of the tag (what would previously be put in ct_tag)",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "ctd_user_defined",
"comment": "Whether this tag was defined manually by a privileged user using Special:Tags",
"type": "mwtinyint",
"options": { "notnull": true, "length": 1 }
},
{
"name": "ctd_count",
"comment": "Number of times this tag was used",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "default": 0 }
}
],
"indexes": [
{ "name": "ctd_name", "columns": [ "ctd_name" ], "unique": true },
{ "name": "ctd_count", "columns": [ "ctd_count" ], "unique": false },
{ "name": "ctd_user_defined", "columns": [ "ctd_user_defined" ], "unique": false }
],
"pk": [ "ctd_id" ]
},
{
"name": "ipblocks_restrictions",
"comment": "Partial Block Restrictions",
"columns": [
{
"name": "ir_ipb_id",
"comment": "The ipb_id from ipblocks",
"type": "integer",
"options": { "unsigned": false, "notnull": true }
},
{
"name": "ir_type",
"comment": "The restriction type id.",
"type": "mwtinyint",
"options": { "notnull": true, "length": 1 }
},
{
"name": "ir_value",
"comment": "The restriction id that corresponds to the type. Typically a Page ID or a Namespace ID.",
"type": "integer",
"options": { "unsigned": false, "notnull": true }
}
],
"indexes": [
{
"name": "ir_type_value",
"comment": "Index to query restrictions by the page or namespace.",
"columns": [ "ir_type", "ir_value" ],
"unique": false
}
],
"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": { "length": 32, "notnull": true }
},
{
"name": "qc_value",
"comment": "Some sort of stored value. Sizes, counts...",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "qc_namespace",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "qc_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
}
],
"indexes": [
{ "name": "qc_type", "columns": [ "qc_type", "qc_value" ], "unique": false }
],
"pk": []
},
{
"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": { "length": 32, "notnull": true }
},
{
"name": "qcc_value",
"comment": "Some sort of stored value. Sizes, counts...",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "qcc_namespace",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "qcc_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "qcc_namespacetwo",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "qcc_titletwo",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
}
],
"indexes": [
{ "name": "qcc_type", "columns": [ "qcc_type", "qcc_value" ], "unique": false },
{ "name": "qcc_title", "columns": [ "qcc_type", "qcc_namespace", "qcc_title" ], "unique": false },
{ "name": "qcc_titletwo", "columns": [ "qcc_type", "qcc_namespacetwo", "qcc_titletwo" ], "unique": false }
],
"pk": []
},
{
"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": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "pr_page",
"comment": "Page to apply restrictions to (Foreign Key to page).",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "pr_type",
"comment": "The protection type (edit, move, etc)",
"type": "binary",
"options": { "length": 60, "notnull": true }
},
{
"name": "pr_level",
"comment": "The protection level (Sysop, autoconfirmed, etc)",
"type": "binary",
"options": { "length": 60, "notnull": true }
},
{
"name": "pr_cascade",
"type": "mwtinyint",
"options": { "notnull": true }
},
{
"name": "pr_user",
"comment": "Field for future support of per-user restriction.",
"type": "integer",
"options": { "notnull": false, "unsigned": true }
},
{
"name": "pr_expiry",
"comment": "Field for time-limited protection.",
"type": "mwtimestamp",
"options": {
"notnull": false,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
}
],
"indexes": [
{ "name": "pr_pagetype", "columns": [ "pr_page", "pr_type" ], "unique": true },
{ "name": "pr_typelevel", "columns": [ "pr_type", "pr_level" ], "unique": false },
{ "name": "pr_level", "columns": [ "pr_level" ], "unique": false },
{ "name": "pr_cascade", "columns": [ "pr_cascade" ], "unique": false }
],
"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": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"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": { "length": 255, "notnull": true, "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": {
"notnull": false,
"default": null,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
}
],
"indexes": [
{ "name": "ug_group", "columns": [ "ug_group" ], "unique": false },
{ "name": "ug_expiry", "columns": [ "ug_expiry" ], "unique": false }
],
"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": { "length": 32, "notnull": true, "default": "" }
},
{
"name": "qci_timestamp",
"comment": "Timestamp of last update",
"type": "mwtimestamp",
"options": { "length": 14, "notnull": true, "default": "19700101000000" }
}
],
"indexes": [],
"pk": [ "qci_type" ]
},
{
"name": "watchlist",
"columns": [
{
"name": "wl_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "wl_user",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "wl_namespace",
"type": "integer",
"options": { "notnull": true, "unsigned": false, "default": 0 }
},
{
"name": "wl_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "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": { "notnull": false }
}
],
"indexes": [
{
"name": "wl_user",
"columns": [ "wl_user", "wl_namespace", "wl_title" ],
"comment": "Special:Watchlist",
"unique": true
},
{
"name": "namespace_title",
"columns": [ "wl_namespace", "wl_title" ],
"comment": "Special:Movepage (WatchedItemStore::duplicateEntry)",
"unique": false
},
{
"name": "wl_user_notificationtimestamp",
"columns": [ "wl_user", "wl_notificationtimestamp" ],
"comment": "ApiQueryWatchlistRaw changed filter",
"unique": false
}
],
"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": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "site_global_key",
"type": "binary",
"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.",
"options": { "notnull": true, "length": 65530 }
}
],
"indexes": [
{ "name": "sites_global_key", "columns": [ "site_global_key" ], "unique": true },
{ "name": "sites_type", "columns": [ "site_type" ], "unique": false },
{ "name": "sites_group", "columns": [ "site_group" ], "unique": false },
{ "name": "sites_source", "columns": [ "site_source" ], "unique": false },
{ "name": "sites_language", "columns": [ "site_language" ], "unique": false },
{ "name": "sites_protocol", "columns": [ "site_protocol" ], "unique": false },
{ "name": "sites_domain", "columns": [ "site_domain" ], "unique": false },
{ "name": "sites_forward", "columns": [ "site_forward" ], "unique": false }
],
"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": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"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": { "length": 40, "notnull": true, "default": "" }
},
{
"name": "user_last_timestamp",
"comment": "The highest timestamp of revisions of the talk page viewed by this user",
"type": "mwtimestamp",
"options": { "notnull": false }
}
],
"indexes": [
{ "name": "un_user_id", "columns": [ "user_id" ], "unique": false },
{ "name": "un_user_ip", "columns": [ "user_id" ], "unique": false }
],
"pk": []
},
{
"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": { "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.",
"options": { "notnull": true, "default": 0 }
}
],
"indexes": [],
"pk": [ "iw_prefix" ]
},
{
"name": "protected_titles",
"comment": "Used for storing nonexistent pages that have been protected",
"columns": [
{
"name": "pt_namespace",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "pt_title",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "pt_user",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "pt_reason_id",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "pt_timestamp",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "pt_expiry",
"type": "mwtimestamp",
"options": {
"notnull": true,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
},
{
"name": "pt_create_perm",
"type": "binary",
"options": { "length": 60, "notnull": true }
}
],
"indexes": [ { "name": "pt_timestamp", "columns": [ "pt_timestamp" ], "unique": false } ],
"pk": [ "pt_namespace", "pt_title" ]
}
]