You are here

function userpoints_update_2 in User Points 5

Same name and namespace in other branches
  1. 5.3 userpoints.install \userpoints_update_2()
  2. 5.2 userpoints.install \userpoints_update_2()
  3. 6 userpoints.install \userpoints_update_2()

File

./userpoints.install, line 71

Code

function userpoints_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':

      // Add the max_points column
      $ret[] = update_sql("ALTER TABLE {userpoints} ADD max_points INT(10) NOT NULL DEFAULT '0' AFTER points");

      // Make the points column bigger
      $ret[] = update_sql("ALTER TABLE {userpoints} CHANGE points points INT(10) NOT NULL DEFAULT '0'");
      break;
  }
  return $ret;
}