r45235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45234‎ | r45235 | r45236 >
Date:18:10, 31 December 2008
Author:vasilievvv
Status:reverted (Comments)
Tags:
Comment:
* Fix up schema per Brion's notes
Modified paths:
  • /trunk/phase3/maintenance/archives/patch-user_restrictions.sql (modified) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-user_restrictions.sql
@@ -5,7 +5,7 @@
66 ur_id int NOT NULL auto_increment,
77
88 -- Restriction type. Block from either editing namespace or page
9 - ur_type varbinary(255) NOT NULL,
 9+ ur_type ENUM('namespace','page') NOT NULL,
1010 -- Namespace to restrict if ur_type = namespace
1111 ur_namespace int default NULL,
1212 -- Page to restrict if ur_type = page
@@ -14,13 +14,13 @@
1515
1616 -- User that is restricted
1717 ur_user int unsigned NOT NULL,
18 - ur_user_text tinyblob NOT NULL,
 18+ ur_user_text varchar(255) NOT NULL,
1919
2020 -- User who has done this restriction
2121 ur_by int unsigned NOT NULL,
2222 ur_by_text varchar(255) binary NOT NULL default '',
2323 -- Reason for this restriction
24 - ur_reason tinyblob NOT NULL,
 24+ ur_reason mediumblob NOT NULL,
2525
2626 -- Time when this restriction was made
2727 ur_timestamp varbinary(14) NOT NULL default '',
@@ -29,11 +29,11 @@
3030
3131 PRIMARY KEY ur_id (ur_id),
3232 -- For looking up restrictions for user and title
33 - INDEX ur_user (ur_user,ur_user_text(255)),
 33+ INDEX ur_user (ur_user),
3434 INDEX ur_user_page(ur_user,ur_page_namespace,ur_page_title(255)),
3535 INDEX ur_user_namespace(ur_user,ur_namespace),
3636 -- For Special:ListUserRestrictions
37 - INDEX ur_type (ur_type(255),ur_timestamp),
 37+ INDEX ur_type (ur_type,ur_timestamp),
3838 INDEX ur_namespace (ur_namespace,ur_timestamp),
3939 INDEX ur_page (ur_page_namespace,ur_page_title,ur_timestamp),
4040 INDEX ur_timestamp (ur_timestamp),
Index: trunk/phase3/maintenance/tables.sql
@@ -1249,7 +1249,7 @@
12501250 ur_id int NOT NULL auto_increment,
12511251
12521252 -- Restriction type. Block from either editing namespace or page
1253 - ur_type varbinary(255) NOT NULL,
 1253+ ur_type ENUM('namespace','page') NOT NULL,
12541254 -- Namespace to restrict if ur_type = namespace
12551255 ur_namespace int default NULL,
12561256 -- Page to restrict if ur_type = page
@@ -1258,13 +1258,13 @@
12591259
12601260 -- User that is restricted
12611261 ur_user int unsigned NOT NULL,
1262 - ur_user_text tinyblob NOT NULL,
 1262+ ur_user_text varchar(255) NOT NULL,
12631263
12641264 -- User who has done this restriction
12651265 ur_by int unsigned NOT NULL,
12661266 ur_by_text varchar(255) binary NOT NULL default '',
12671267 -- Reason for this restriction
1268 - ur_reason tinyblob NOT NULL,
 1268+ ur_reason mediumblob NOT NULL,
12691269
12701270 -- Time when this restriction was made
12711271 ur_timestamp varbinary(14) NOT NULL default '',
@@ -1273,11 +1273,11 @@
12741274
12751275 PRIMARY KEY ur_id (ur_id),
12761276 -- For looking up restrictions for user and title
1277 - INDEX ur_user (ur_user,ur_user_text(255)),
 1277+ INDEX ur_user (ur_user),
12781278 INDEX ur_user_page(ur_user,ur_page_namespace,ur_page_title(255)),
12791279 INDEX ur_user_namespace(ur_user,ur_namespace),
12801280 -- For Special:ListUserRestrictions
1281 - INDEX ur_type (ur_type(255),ur_timestamp),
 1281+ INDEX ur_type (ur_type,ur_timestamp),
12821282 INDEX ur_namespace (ur_namespace,ur_timestamp),
12831283 INDEX ur_page (ur_page_namespace,ur_page_title,ur_timestamp),
12841284 INDEX ur_timestamp (ur_timestamp),

Follow-up revisions

RevisionCommit summaryAuthorDate
r45241Revert r45231, r45235 "* (bug 674) Allow users to be blocked from editing a s...brion18:56, 31 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   18:56, 31 December 2008

Reverted for now in r45241

Unexpected schema changes in the middle of code review and run-up to 1.14 freeze

Status & tagging log