You are here

function path_redirect_update_3 in Path redirect 5

Same name and namespace in other branches
  1. 6 path_redirect.install \path_redirect_update_3()

Fix a typo that could have caused the code 306 to be used mistakenly.

File

./path_redirect.install, line 104
Install and uninstall schema and functions for the path_redirect module.

Code

function path_redirect_update_3() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {path_redirect} MODIFY type int(10) NOT NULL");
      $ret[] = update_sql("UPDATE {sequences} SET name = '{path_redirect}_rid' WHERE name = '{path_redirect}'");
      break;
    case 'pgsql':
      db_change_column($ret, 'path_redirect', 'type', 'type', 'smallint');
      break;
  }
  $ret[] = update_sql("UPDATE {path_redirect} SET type = 307 WHERE type = 306");
  return $ret;
}