Commit 38082fe4 authored by Dries's avatar Dries
Browse files

- Patch #809132 by marcingy, andypost: increase size of init field on users...

- Patch #809132 by marcingy, andypost: increase size of init field on users table to 254 characters and add missing index.
parent 4e242467
......@@ -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);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment