system_update_1015

Versions
5
system_update_1015()

Add an index on watchdog type.

Related topics

Code

modules/system/system.install, line 3404

<?php
function system_update_1015() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql('ALTER TABLE {watchdog} ADD INDEX (type)');
      break;
    case 'pgsql':
      $ret[] = update_sql('CREATE INDEX {watchdog}_type_idx ON {watchdog}(type)');
      break;
  }
  return $ret;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.