Manual:protected_titles table
From Linux Web Expert
↑ Manual:Contents | <translate> MediaWiki database layout</translate> | <translate> <tvar name=1>protected_titles</tvar> table</translate> |
MediaWiki version: | <translate> ≥</translate> 1.12 |
The protected_titles table contains Protection of non-existent pages. Restrictions on existing pages are stored in the page_restrictions table.
The list of protected pages can be found at Special:Protectedtitles.
Fields
pt_namespace
pt_title
pt_user
User id of user who protected the page title.
pt_reason
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.32</tvar> is unsupported version</translate>"><translate> ≤</translate> 1.32
<translate> MediaWiki version:</translate> |
Protection comment.
<translate> (deprecated)</translate> pt_reason_id and the comment table should be used instead!
pt_reason_id
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>"><translate> ≥</translate> 1.30
<translate> MediaWiki version:</translate> |
This is a foreign key to comment_id in the comment table.
pt_timestamp
Timestamp of when the protection action was taken
pt_expiry
Timestamp of when the protection expires
pt_create_perm
Schema summary
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>"><translate> ≥</translate> 1.36
<translate> MediaWiki version:</translate> |
DESCRIBE protected_titles;
+----------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------------------+------+-----+---------+-------+ | pt_namespace | int(11) | NO | PRI | NULL | | | pt_title | varbinary(255) | NO | PRI | NULL | | | pt_user | int(10) unsigned | NO | | NULL | | | pt_reason_id | bigint(20) unsigned | NO | | NULL | | | pt_timestamp | binary(14) | NO | MUL | NULL | | | pt_expiry | varbinary(14) | NO | | NULL | | | pt_create_perm | varbinary(60) | NO | | NULL | | +----------------+---------------------+------+-----+---------+-------+<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.35</tvar> is unsupported version</translate>">
1.33 – 1.35
<translate> MediaWiki versions:</translate> |
DESCRIBE protected_titles;
+----------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------------------+------+-----+---------+-------+ | pt_namespace | int(11) | NO | PRI | NULL | | | pt_title | varbinary(255) | NO | PRI | NULL | | | pt_user | int(10) unsigned | NO | | NULL | | | pt_reason_id | bigint(20) unsigned | NO | | NULL | | | pt_timestamp | binary(14) | NO | MUL | NULL | | | pt_expiry | varbinary(14) | NO | | | | | pt_create_perm | varbinary(60) | NO | | NULL | | +----------------+---------------------+------+-----+---------+-------+<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.32</tvar> is unsupported version</translate>">
1.30 – 1.32
<translate> MediaWiki versions:</translate> |
DESCRIBE protected_titles;
+----------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------------------+------+-----+---------+-------+ | pt_namespace | int(11) | NO | PRI | NULL | | | pt_title | varbinary(255) | NO | PRI | NULL | | | pt_user | int(10) unsigned | NO | | NULL | | | pt_reason | varbinary(767) | YES | | | | | pt_reason_id | bigint(20) unsigned | NO | | 0 | | | pt_timestamp | binary(14) | NO | MUL | NULL | | | pt_expiry | varbinary(14) | NO | | | | | pt_create_perm | varbinary(60) | NO | | NULL | | +----------------+---------------------+------+-----+---------+-------+<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.29</tvar> is unsupported version</translate>">
1.25 – 1.29
<translate> MediaWiki versions:</translate> |
DESCRIBE protected_titles;
+----------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+------------------+------+-----+---------+-------+ | pt_namespace | int(11) | NO | PRI | NULL | | | pt_title | varbinary(255) | NO | PRI | NULL | | | pt_user | int(10) unsigned | NO | | NULL | | | pt_reason | varbinary(767) | YES | | NULL | | | pt_timestamp | binary(14) | NO | MUL | NULL | | | pt_expiry | varbinary(14) | NO | | | | | pt_create_perm | varbinary(60) | NO | | NULL | | +----------------+------------------+------+-----+---------+-------+<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.24</tvar> is unsupported version</translate>">
1.12 – 1.24
<translate> MediaWiki versions:</translate> |
DESCRIBE protected_titles;
+----------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+------------------+------+-----+---------+-------+ | pt_namespace | int(11) | NO | PRI | NULL | | | pt_title | varbinary(255) | NO | PRI | NULL | | | pt_user | int(10) unsigned | NO | | NULL | | | pt_reason | tinyblob | YES | | NULL | | | pt_timestamp | binary(14) | NO | MUL | NULL | | | pt_expiry | varbinary(14) | NO | | | | | pt_create_perm | varbinary(60) | NO | | NULL | | +----------------+------------------+------+-----+---------+-------+
Indexes
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>"><translate> ≥</translate> 1.32
<translate> MediaWiki version:</translate> |
SHOW INDEX IN protected_titles;
+------------------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +------------------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | protected_titles | 0 | PRIMARY | 1 | pt_namespace | A | 0 | NULL | NULL | | BTREE | | | | protected_titles | 0 | PRIMARY | 2 | pt_title | A | 0 | NULL | NULL | | BTREE | | | | protected_titles | 1 | pt_timestamp | 1 | pt_timestamp | A | 0 | NULL | NULL | | BTREE | | | +------------------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+