You are here

function acl_update_7001 in ACL 7

Install better indexes.

File

./acl.install, line 198
Install, update and uninstall functions for the acl module.

Code

function acl_update_7001() {
  if (db_index_exists('acl', 'name')) {
    db_drop_index('acl', 'name');
  }
  if (!db_index_exists('acl', 'module_name_number')) {
    db_add_index('acl', 'module_name_number', array(
      array(
        'module',
        64,
      ),
      array(
        'name',
        64,
      ),
      'number',
    ));
  }
  if (db_index_exists('acl', 'number')) {
    db_drop_index('acl', 'number');
  }
  if (!db_index_exists('acl', 'module_number')) {
    db_add_index('acl', 'module_number', array(
      array(
        'module',
        64,
      ),
      'number',
    ));
  }
}