b78a1082516da20316912198e418747b018a54d2
1 -- Allows admins to block user from editing certain namespaces or pages
3 CREATE TABLE /*$wgDBprefix*/user_restrictions (
4 -- ID of the restriction
5 ur_id
int NOT NULL auto_increment
,
7 -- Restriction type. Block from either editing namespace or page
8 ur_type
varbinary(255) NOT NULL,
9 -- Namespace to restrict if ur_type = namespace
10 ur_namespace
int default NULL,
11 -- Page to restrict if ur_type = page
12 ur_page_namespace
int default NULL,
13 ur_page_title
varchar(255) binary default '',
15 -- User that is restricted
16 ur_user
int unsigned
NOT NULL,
17 ur_user_text tinyblob
NOT NULL,
19 -- User who has done this restriction
20 ur_by
int unsigned
NOT NULL,
21 ur_by_text
varchar(255) binary NOT NULL default '',
22 -- Reason for this restriction
23 ur_reason tinyblob
NOT NULL,
25 -- Time when this restriction was made
26 ur_timestamp
varbinary(14) NOT NULL default '',
27 -- Expiry or "infinity"
28 ur_expiry
varbinary(14) NOT NULL default '',
30 PRIMARY KEY ur_id (ur_id
),
31 -- For looking up restrictions for user
32 INDEX ur_user (ur_user
,ur_user_text(255)),
33 -- For Special:ListUserRestrictions
34 INDEX ur_type (ur_type(255),ur_timestamp
),
35 INDEX ur_namespace (ur_namespace
,ur_timestamp
),
36 INDEX ur_page (ur_page_namespace
,ur_page_title
,ur_timestamp
),
37 INDEX ur_timestamp (ur_timestamp
),
38 -- For quick removal of expired restrictions
39 INDEX ur_expiry (ur_expiry
)
40 ) /*$wgDBTableOptions*/;