You are here

function flag_update_6208 in Flag 6.2

Same name and namespace in other branches
  1. 7.3 flag.install \flag_update_6208()
  2. 7.2 flag.install \flag_update_6208()

Convert flag_count indexes to include FID for more efficient indexing.

File

./flag.install, line 652
Flag module install/schema/update hooks.

Code

function flag_update_6208() {
  $ret = array();
  db_drop_index($ret, 'flag_counts', 'count');
  db_drop_index($ret, 'flag_counts', 'last_updated');
  db_add_index($ret, 'flag_counts', 'fid_count', array(
    'fid',
    'count',
  ));
  db_add_index($ret, 'flag_counts', 'fid_last_updated', array(
    'fid',
    'last_updated',
  ));
  return $ret;
}