You are here

function userpoints_update_5 in User Points 5.2

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

File

./userpoints.install, line 110

Code

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

      // Add the reference column and its index
      $ret[] = update_sql("ALTER TABLE {userpoints_txn} ADD COLUMN reference VARCHAR(128) AFTER description");
      $ret[] = update_sql("ALTER TABLE {userpoints_txn} ADD INDEX reference (reference )");
      break;
  }
  return $ret;
}