You are here

function system_update_1017 in Drupal 5

Allow role names to be up to 64 characters.

Related topics

File

modules/system/system.install, line 3438

Code

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;
}