function db_add_index
7.x database.inc | db_add_index($table, $name, $fields) |
6.x database.pgsql.inc | db_add_index(&$ret, $table, $name, $fields) |
6.x database.mysql-common.inc | db_add_index(&$ret, $table, $name, $fields) |
Adds an index.
Parameters
$table: The table to be altered.
$name: The name of the index.
$fields: An array of field names.
Related topics
30 calls to db_add_index()
- aggregator_update_7002 in drupal-7.x/
modules/ aggregator/ aggregator.install - Add queued timestamp.
- aggregator_update_7003 in drupal-7.x/
modules/ aggregator/ aggregator.install - Increase the length of {aggregator_feed}.url.
- comment_update_7002 in drupal-7.x/
modules/ comment/ comment.install - Rename {comments} table to {comment} and upgrade it.
- comment_update_7003 in drupal-7.x/
modules/ comment/ comment.install - Split {comment}.timestamp into 'created' and 'changed', improve indexing on {comment}.
- comment_update_7004 in drupal-7.x/
modules/ comment/ comment.install - Upgrade the {node_comment_statistics} table.
File
- drupal-7.x/
includes/ database/ database.inc, line 2941 - Core systems for the database layer.
Code
function db_add_index($table, $name, $fields) {
return Database::getConnection()->schema()->addIndex($table, $name, $fields);
}