Manual:Category table
From MediaWiki.org
(Redirected from Category table)
| ↑ Manual:Contents | MediaWiki database layout | Category table |
| MediaWiki version: | ≥ 1.13 |
Track all existing categories. Something is a category if
- it has an entry somewhere in categorylinks, or
- it once did.
Categories might not have corresponding pages, so they need to be tracked separately.
| MediaWiki version: | 1.14 |
| MediaWiki version: | 1.13 |
+-------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+---------------------+------+-----+---------+----------------+ | cat_id | int(10) unsigned | | PRI | NULL | auto_increment | | cat_title | varbinary(255) | | UNI | | | | cat_pages | int(11) | | MUL | 0 | | | cat_subcats | int(11) | | | 0 | | | cat_files | int(11) | | | 0 | | | cat_hidden | tinyint(3) unsigned | | | 0 | | +-------------+---------------------+------+-----+---------+----------------+
[edit] Fields
- cat_id
- Primary key
- cat_title
- Name of the category, in the same form as page.page_title (with underscores). If there is a category page corresponding to this category, by definition, it has this name (in the Category namespace).
- cat_pages
- Number of pages in the category
- cat_subcats
- Number of sub-categories in the category
- cat_files
- Number of files in the category
- cat_hidden
- Reserved for future use
Note: The pages and sub-categories are stored in the categorylinks table.
Note: Information regarding which categories are hidden is stored in the page_props table.
Note: The number fields 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.
Note: If the information in this table is incorrect, run the maintenance script populateCategory.php, if neccessary with the --force option.
| Language: | English • Polski |
|---|