Index: trunk/phase3/maintenance/archives/patch-user_restrictions.sql |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | ur_id int NOT NULL auto_increment, |
7 | 7 | |
8 | 8 | -- Restriction type. Block from either editing namespace or page |
9 | | - ur_type varbinary(255) NOT NULL, |
| 9 | + ur_type ENUM('namespace','page') NOT NULL, |
10 | 10 | -- Namespace to restrict if ur_type = namespace |
11 | 11 | ur_namespace int default NULL, |
12 | 12 | -- Page to restrict if ur_type = page |
— | — | @@ -14,13 +14,13 @@ |
15 | 15 | |
16 | 16 | -- User that is restricted |
17 | 17 | ur_user int unsigned NOT NULL, |
18 | | - ur_user_text tinyblob NOT NULL, |
| 18 | + ur_user_text varchar(255) NOT NULL, |
19 | 19 | |
20 | 20 | -- User who has done this restriction |
21 | 21 | ur_by int unsigned NOT NULL, |
22 | 22 | ur_by_text varchar(255) binary NOT NULL default '', |
23 | 23 | -- Reason for this restriction |
24 | | - ur_reason tinyblob NOT NULL, |
| 24 | + ur_reason mediumblob NOT NULL, |
25 | 25 | |
26 | 26 | -- Time when this restriction was made |
27 | 27 | ur_timestamp varbinary(14) NOT NULL default '', |
— | — | @@ -29,11 +29,11 @@ |
30 | 30 | |
31 | 31 | PRIMARY KEY ur_id (ur_id), |
32 | 32 | -- For looking up restrictions for user and title |
33 | | - INDEX ur_user (ur_user,ur_user_text(255)), |
| 33 | + INDEX ur_user (ur_user), |
34 | 34 | INDEX ur_user_page(ur_user,ur_page_namespace,ur_page_title(255)), |
35 | 35 | INDEX ur_user_namespace(ur_user,ur_namespace), |
36 | 36 | -- For Special:ListUserRestrictions |
37 | | - INDEX ur_type (ur_type(255),ur_timestamp), |
| 37 | + INDEX ur_type (ur_type,ur_timestamp), |
38 | 38 | INDEX ur_namespace (ur_namespace,ur_timestamp), |
39 | 39 | INDEX ur_page (ur_page_namespace,ur_page_title,ur_timestamp), |
40 | 40 | INDEX ur_timestamp (ur_timestamp), |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -1249,7 +1249,7 @@ |
1250 | 1250 | ur_id int NOT NULL auto_increment, |
1251 | 1251 | |
1252 | 1252 | -- Restriction type. Block from either editing namespace or page |
1253 | | - ur_type varbinary(255) NOT NULL, |
| 1253 | + ur_type ENUM('namespace','page') NOT NULL, |
1254 | 1254 | -- Namespace to restrict if ur_type = namespace |
1255 | 1255 | ur_namespace int default NULL, |
1256 | 1256 | -- Page to restrict if ur_type = page |
— | — | @@ -1258,13 +1258,13 @@ |
1259 | 1259 | |
1260 | 1260 | -- User that is restricted |
1261 | 1261 | ur_user int unsigned NOT NULL, |
1262 | | - ur_user_text tinyblob NOT NULL, |
| 1262 | + ur_user_text varchar(255) NOT NULL, |
1263 | 1263 | |
1264 | 1264 | -- User who has done this restriction |
1265 | 1265 | ur_by int unsigned NOT NULL, |
1266 | 1266 | ur_by_text varchar(255) binary NOT NULL default '', |
1267 | 1267 | -- Reason for this restriction |
1268 | | - ur_reason tinyblob NOT NULL, |
| 1268 | + ur_reason mediumblob NOT NULL, |
1269 | 1269 | |
1270 | 1270 | -- Time when this restriction was made |
1271 | 1271 | ur_timestamp varbinary(14) NOT NULL default '', |
— | — | @@ -1273,11 +1273,11 @@ |
1274 | 1274 | |
1275 | 1275 | PRIMARY KEY ur_id (ur_id), |
1276 | 1276 | -- For looking up restrictions for user and title |
1277 | | - INDEX ur_user (ur_user,ur_user_text(255)), |
| 1277 | + INDEX ur_user (ur_user), |
1278 | 1278 | INDEX ur_user_page(ur_user,ur_page_namespace,ur_page_title(255)), |
1279 | 1279 | INDEX ur_user_namespace(ur_user,ur_namespace), |
1280 | 1280 | -- For Special:ListUserRestrictions |
1281 | | - INDEX ur_type (ur_type(255),ur_timestamp), |
| 1281 | + INDEX ur_type (ur_type,ur_timestamp), |
1282 | 1282 | INDEX ur_namespace (ur_namespace,ur_timestamp), |
1283 | 1283 | INDEX ur_page (ur_page_namespace,ur_page_title,ur_timestamp), |
1284 | 1284 | INDEX ur_timestamp (ur_timestamp), |