r85636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85635‎ | r85636 | r85637 >
Date:20:57, 7 April 2011
Author:aaron
Status:ok
Tags:
Comment:
Cleaned up DB files
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount.sql (modified) (history)
  • /trunk/extensions/ConfirmAccount/archives/patch-account_credentials.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/archives/patch-account_credentials.sql
@@ -1,15 +1,15 @@
22 -- (c) Aaron Schulz, 2007
33
44 ALTER TABLE /*$wgDBprefix*/account_requests
5 - ADD acr_type tinyint(255) default 0,
 5+ ADD acr_type tinyint(255) unsigned NOT NULL default 0,
66 DROP INDEX acr_deleted_reg,
77 ADD INDEX acr_type_del_reg (acr_type,acr_deleted,acr_registration);
88
99 -- This stores all of credential information
1010 -- When accounts are confirmed, the identity info goes here
11 -CREATE TABLE /*$wgDBprefix*/account_credentials (
 11+CREATE TABLE IF NOT EXISTS /*_*/account_credentials (
1212 -- Revision ID #
13 - acd_id int unsigned NOT NULL auto_increment,
 13+ acd_id int unsigned NOT NULL auto_increment PRIMARY KEY,
1414 -- Foreign key to user.user_id
1515 acd_user_id int unsigned NOT NULL,
1616 -- Optional 'real name' to be displayed in credit listings
@@ -34,18 +34,16 @@
3535 acd_storage_key VARCHAR(64) NULL,
3636 -- Areas of interest
3737 acd_areas mediumblob NOT NULL,
38 -
 38+
3939 -- Timestamp of account registration.
4040 acd_registration char(14) NOT NULL,
41 -
 41+
4242 -- Timestamp of acceptance
4343 acd_accepted binary(14),
4444 -- The user who accepted it
4545 acd_user int unsigned NOT NULL default 0,
4646 -- Reason given in email
47 - acd_comment varchar(255) NOT NULL default '',
48 -
49 - PRIMARY KEY (acd_user_id,acd_id),
50 - UNIQUE KEY (acd_id)
51 -
 47+ acd_comment varchar(255) NOT NULL default ''
5248 ) /*$wgDBTableOptions*/;
 49+
 50+CREATE UNIQUE INDEX /*i*/acd_user_id ON /*_*/account_credentials (acd_user_id,acd_id);
Index: trunk/extensions/ConfirmAccount/ConfirmAccount.sql
@@ -5,8 +5,8 @@
66
77 -- This stores all of our reviews,
88 -- the corresponding tags are stored in the tag table
9 -CREATE TABLE /*_*/account_requests (
10 - acr_id int unsigned NOT NULL auto_increment,
 9+CREATE TABLE IF NOT EXISTS /*_*/account_requests (
 10+ acr_id int unsigned NOT NULL auto_increment PRIMARY KEY,
1111 -- Usernames must be unique, must not be in the form of
1212 -- an IP address. _Shouldn't_ allow slashes or case
1313 -- conflicts. Spaces are allowed, and are _not_ converted
@@ -39,7 +39,7 @@
4040 acr_filename VARCHAR(255) NULL,
4141 acr_storage_key VARCHAR(64) NULL,
4242 -- Prospective account access level
43 - acr_type tinyint(255) unsigned default 0,
 43+ acr_type tinyint(255) unsigned NOT NULL default 0,
4444 -- Areas of interest
4545 acr_areas mediumblob NOT NULL,
4646
@@ -55,20 +55,19 @@
5656 -- The user who rejected/held it
5757 acr_user int unsigned NOT NULL default 0,
5858 -- Reason
59 - acr_comment varchar(255) NOT NULL default '',
60 -
61 - PRIMARY KEY (acr_id),
62 - UNIQUE KEY (acr_name),
63 - UNIQUE KEY (acr_email(255)),
64 - INDEX (acr_email_token),
65 - INDEX acr_type_del_reg (acr_type,acr_deleted,acr_registration)
 59+ acr_comment varchar(255) NOT NULL default ''
6660 ) /*$wgDBTableOptions*/;
6761
 62+CREATE UNIQUE INDEX /*i*/acr_name ON /*_*/account_requests (acr_name);
 63+CREATE UNIQUE INDEX /*i*/acr_email ON /*_*/account_requests (acr_email(255));
 64+CREATE INDEX /*i*/acr_email_token ON /*_*/account_requests (acr_email_token);
 65+CREATE INDEX /*i*/acr_type_del_reg ON /*_*/account_requests (acr_type,acr_deleted,acr_registration);
 66+
6867 -- This stores all of credential information
6968 -- When accounts are confirmed, the identity info goes here
70 -CREATE TABLE /*_*/account_credentials (
 69+CREATE TABLE IF NOT EXISTS /*_*/account_credentials (
7170 -- Revision ID #
72 - acd_id int unsigned NOT NULL auto_increment,
 71+ acd_id int unsigned NOT NULL auto_increment PRIMARY KEY,
7372 -- Foreign key to user.user_id
7473 acd_user_id int unsigned NOT NULL,
7574 -- Optional 'real name' to be displayed in credit listings
@@ -102,9 +101,7 @@
103102 -- The user who accepted it
104103 acd_user int unsigned NOT NULL default 0,
105104 -- Reason given in email
106 - acd_comment varchar(255) NOT NULL default '',
107 -
108 - PRIMARY KEY (acd_user_id,acd_id),
109 - UNIQUE KEY (acd_id)
110 -
 105+ acd_comment varchar(255) NOT NULL default ''
111106 ) /*$wgDBTableOptions*/;
 107+
 108+CREATE UNIQUE INDEX /*i*/acd_user_id ON /*_*/account_credentials (acd_user_id,acd_id);

Status & tagging log