You are here

function userpoints_update_6011 in User Points 6

File

./userpoints.install, line 262

Code

function userpoints_update_6011() {
  $ret = array();
  db_add_field($ret, 'userpoints_txn', 'changed', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => 'Effective timestamp of last action on this transaction, for tracking purposes.',
  ));

  //Optional: An index could help about tracking operations so it would be better to define here..
  db_add_index($ret, 'userpoints_txn', 'changed', array(
    'changed',
  ));

  //Optional: update table information to mark each transaction as changed on creation only..
  $ret[] = update_sql("UPDATE {userpoints_txn} SET changed = time_stamp");
  return $ret;
}