You are here

function pathauto_update_2 in Pathauto 5.2

Increase the maximum length of variable names from 48 to 128.

Copied from DRUPAL-6 system_update_6002 per http://drupal.org/node/66795

File

./pathauto.install, line 93
Install, update, and uninstall functions for Pathauto.

Code

function pathauto_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      db_change_column($ret, 'variable', 'name', 'name', 'varchar(128)', array(
        'not null' => TRUE,
        'default' => "''",
      ));
      break;
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {variable} CHANGE name name varchar(128) NOT NULL default ''");
      break;
  }
  return $ret;
}