system_update_1017

Versions
5
system_update_1017()

Allow role names to be up to 64 characters.

Related topics

Code

modules/system/system.install, line 3438

<?php
function system_update_1017() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      db_change_column($ret, 'role', 'name', 'name', 'varchar(64)', array('not null' => TRUE, 'default' => "''"));
      break;
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {role} CHANGE name name varchar(64) NOT NULL default ''");
      break;
  }
  return $ret;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.