From 38082fe41487ebb683d3546c7e9738a722d5459c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 26 May 2010 19:48:45 +0000 Subject: - Patch #809132 by marcingy, andypost: increase size of init field on users table to 254 characters and add missing index. --- modules/user/user.install | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/user/user.install b/modules/user/user.install index aef0f9fb9..820cb6943 100644 --- a/modules/user/user.install +++ b/modules/user/user.install @@ -144,7 +144,7 @@ function user_schema() { 'length' => 254, 'not null' => FALSE, 'default' => '', - 'description' => "User's email address.", + 'description' => "User's e-mail address.", ), 'theme' => array( 'type' => 'varchar', @@ -206,10 +206,10 @@ function user_schema() { ), 'init' => array( 'type' => 'varchar', - 'length' => 64, + 'length' => 254, 'not null' => FALSE, 'default' => '', - 'description' => 'Email address used for initial account creation.', + 'description' => 'E-mail address used for initial account creation.', ), 'data' => array( 'type' => 'text', @@ -548,11 +548,25 @@ function user_update_7004(&$sandbox) { } /** - * Change the users table to allow longer email addresses - 254 characters instead of 64. + * Changes the users table to allow longer e-mail addresses. */ function user_update_7005(&$sandbox) { - $schema = user_schema(); - db_change_field('users', 'mail', 'mail', $schema['users']['fields']['mail']); + $mail_field = array( + 'type' => 'varchar', + 'length' => 254, + 'not null' => FALSE, + 'default' => '', + 'description' => "User's e-mail address.", + ); + $init_field = array( + 'type' => 'varchar', + 'length' => 254, + 'not null' => FALSE, + 'default' => '', + 'description' => 'E-mail address used for initial account creation.', + ); + db_change_field('users', 'mail', 'mail', $mail_field, array('indexes' => array('mail' => array('mail')))); + db_change_field('users', 'init', 'init', $init_field); } /** -- cgit v1.2.3