You are here

function path_redirect_update_1 in Path redirect 5

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

Allow longer values for path and redirect. Add a unique key on rid.

File

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

Code

function path_redirect_update_1() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {path_redirect} MODIFY path VARCHAR(255)");
      $ret[] = update_sql("ALTER TABLE {path_redirect} MODIFY redirect VARCHAR(255)");
      $ret[] = update_sql("ALTER TABLE {path_redirect} ADD UNIQUE (rid)");
      break;
  }
  return $ret;
}