You are here

function userpoints_update_6013 in User Points 6

Add indexes to speed up contrib modules that query the `points` columns.

File

./userpoints.install, line 291

Code

function userpoints_update_6013() {
  $ret = array();
  db_add_index($ret, 'userpoints', 'points', array(
    'points',
  ));
  db_add_index($ret, 'userpoints_txn', 'uid', array(
    'uid',
  ));
  db_add_index($ret, 'userpoints_txn', 'approver_uid', array(
    'approver_uid',
  ));
  db_add_index($ret, 'userpoints_txn', 'points', array(
    'points',
  ));
  return $ret;
}