Manual:protected_titles table

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎dansk • ‎español • ‎polski • ‎日本語
Manual:Contents MediaWiki database layout protected_titles table


MediaWiki version: 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[edit]

pt_namespace[edit]

Namespace .

pt_title[edit]

Page title .

pt_user[edit]

User id of user who protected the page title.

pt_reason[edit]

MediaWiki version: 1.32

Protection comment.

(deprecated) pt_reason_id and the comment table should be used instead!

pt_reason_id[edit]

MediaWiki version: 1.30

This is a foreign key to comment_id in the comment table.

pt_timestamp[edit]

Timestamp of when the protection action was taken

pt_expiry[edit]

Timestamp of when the protection expires

pt_create_perm[edit]

Protection level

Schema summary[edit]

MediaWiki version: 1.33

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    |       |
+----------------+---------------------+------+-----+---------+-------+
MediaWiki versions: 1.30 – 1.32

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    |       |
+----------------+---------------------+------+-----+---------+-------+
MediaWiki versions: 1.25 – 1.29

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    |       |
+----------------+------------------+------+-----+---------+-------+
MediaWiki versions: 1.12 – 1.24

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    |       |
+----------------+------------------+------+-----+---------+-------+