Index: database/updates.inc =================================================================== RCS file: /cvs/drupal/drupal/database/Attic/updates.inc,v retrieving revision 1.224.2.6 diff -u -F^f -r1.224.2.6 updates.inc --- database/updates.inc 8 Jun 2006 21:25:50 -0000 1.224.2.6 +++ database/updates.inc 23 Nov 2006 17:43:51 -0000 @@ -2013,3 +2013,20 @@ function system_update_182() { return $ret; } + +// Ad an index on watchdog:type +function system_update_183() { + $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; +}