You are here

function system_update_6006 in Drupal 6

Drop useless indices on node_counter table.

Related topics

File

modules/system/system.install, line 1328

Code

function system_update_6006() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      $ret[] = update_sql('DROP INDEX {node_counter}_daycount_idx');
      $ret[] = update_sql('DROP INDEX {node_counter}_totalcount_idx');
      $ret[] = update_sql('DROP INDEX {node_counter}_timestamp_idx');
      break;
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX daycount");
      $ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX totalcount");
      $ret[] = update_sql("ALTER TABLE {node_counter} DROP INDEX timestamp");
      break;
  }
  return $ret;
}