Manual:Page restrictions table
Language: | English • 日本語 |
---|
↑ Manual:Contents | MediaWiki database layout | page_restrictions table |
MediaWiki version: | ≥ 1.10 |
The page_restrictions table is used to store page protection levels in MediaWiki 1.10 and later. The most notable feature is the introduction of cascading page protections for high-visibility pages.
This table was introduced in MediaWiki 1.10 (r19095–r19703), and overrides the page_restrictions field in the page table.
Fields[edit | edit source]
pr_id[edit | edit source]
This is the primary key for the table, and is used to identify a particular row in the table.
pr_page[edit | edit source]
This field contains a reference to page_id, which works as the foreign key for this table.
pr_type[edit | edit source]
The type of protection (whether it applies to edits, page moves, or similar) is stored in this field.
pr_level[edit | edit source]
This column describes the level of protection for the page; full protection for sysop-only pages, semi-protection for autoconfirmed users, or any other levels.
pr_cascade[edit | edit source]
This field determines whether cascading protection (meaning that all transcluded templates and images on the page will be protected as well).
pr_user[edit | edit source]
This field is reserved to support a future per-user edit restriction system.
pr_expiry[edit | edit source]
This field contains the timestamp for pages whose protection has a set expiration date, and has a format similar to the expiry time in the Ipblocks table. Rows that contain a null value in this column are considered to be protected indefinitely.
Schema summary[edit | edit source]
MediaWiki versions: | 1.19 – 1.20 |
mysql> describe page_restrictions; +------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | pr_page | int(11) | NO | MUL | NULL | | | pr_type | varbinary(60) | NO | MUL | NULL | | | pr_level | varbinary(60) | NO | MUL | NULL | | | pr_cascade | tinyint(4) | NO | MUL | NULL | | | pr_user | int(11) | YES | | NULL | | | pr_expiry | varbinary(14) | YES | | NULL | | | pr_id | int(10) unsigned | NO | PRI | NULL | auto_increment | +------------+------------------+------+-----+---------+----------------+
MediaWiki version: | 1.13 |
DESCRIBE page_restrictions; on MediaWiki 1.13 gives the following:
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | pr_page | int(11) | NO | PRI | | | | pr_type | varbinary(60) | NO | PRI | | | | pr_level | varbinary(60) | NO | MUL | | | | pr_cascade | tinyint(4) | NO | MUL | | | | pr_user | int(11) | YES | | NULL | | | pr_expiry | varbinary(14) | YES | | NULL | | | pr_id | int(10) unsigned | NO | UNI | NULL | auto_increment | +------------+------------------+------+-----+---------+----------------+
MediaWiki version: | 1.12 |
DESCRIBE page_restrictions; on MediaWiki 1.12 gives the following:
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | pr_page | int(8) | NO | PRI | NULL | | | pr_type | varchar(255) | NO | PRI | NULL | | | pr_level | varchar(255) | NO | MUL | NULL | | | pr_cascade | tinyint(4) | NO | MUL | NULL | | | pr_user | int(8) | YES | | NULL | | | pr_expiry | char(14) | YES | | NULL | | | pr_id | int(10) unsigned | NO | UNI | NULL | auto_increment | +------------+------------------+------+-----+---------+----------------+
MediaWiki version: | 1.11 |
DESCRIBE page_restrictions; on MediaWiki 1.11 gives the following:
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | pr_page | int(11) | NO | PRI | NULL | | | pr_type | varbinary(60) | NO | PRI | NULL | | | pr_level | varbinary(60) | NO | MUL | NULL | | | pr_cascade | tinyint(4) | NO | MUL | NULL | | | pr_user | int(11) | YES | | NULL | | | pr_expiry | varbinary(14) | YES | | NULL | | | pr_id | int(10) unsigned | NO | UNI | NULL | auto_increment | +------------+------------------+------+-----+---------+----------------+
MediaWiki version: | 1.10 |
DESCRIBE page_restrictions; on MediaWiki 1.10 gives the following:
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | pr_page | int(8) | NO | PRI | NULL | | | pr_type | varchar(255) | NO | PRI | NULL | | | pr_level | varchar(255) | NO | MUL | NULL | | | pr_cascade | tinyint(4) | NO | MUL | NULL | | | pr_user | int(8) | YES | | NULL | | | pr_expiry | char(14) | YES | | NULL | | | pr_id | int(10) unsigned | NO | UNI | NULL | auto_increment | +------------+------------------+------+-----+---------+----------------+
![]() |
Engines: MySQL – Oracle – PostgreSQL – SQLite Technical documentation: Schema (tables ) – API property associations – Field prefixes – Primary key storage in other fields – Wikimedia extension tables Configuration: Settings – Sharing Development: Access – Optimization – Policy – Updater – Extension schema updates – Patch file Core tables: archive – category – categorylinks – change_tag – config – externallinks – filearchive – hitcounter – image – imagelinks – interwiki – iwlinks – ipblocks – job – l10n_cache – langlinks – logging – log_search – msg_resource – msg_resource_links – module_deps – objectcache – oldimage – page – pagelinks – page_props – page_restrictions – protected_titles – querycache – querycachetwo – querycache_info – recentchanges – redirect – revision – searchindex – sites – site_stats – tag_summary – templatelinks – text – transcache – updatelog – uploadstash – user – user_former_groups – user_groups – user_newtalk – user_properties – valid_tag – watchlist |
---|