You are here

function og_update_7100 in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og.install \og_update_7100()

Add indexes to og and og_membership tables.

File

./og.install, line 919
Install, update, and uninstall functions for the Organic groups module.

Code

function og_update_7100(&$sandbox) {

  // Make sure we don't try to re-add an index that was added in previous
  // updates.
  if (!db_index_exists('og_membership', 'entity')) {
    db_add_index('og_membership', 'entity', array(
      'etid',
      'entity_type',
    ));
  }
  if (!db_index_exists('og_membership', 'gid')) {
    db_add_index('og_membership', 'gid', array(
      'gid',
    ));
  }
  return t('Added table indexes to {og_membership} table.');
}