protected SqlContentEntityStorageSchema::addIndex($table, $name, array $specifier, array $schema)
Creates an index, dropping it if already existing.
string $table: The table name.
string $name: The index name.
array $specifier: The fields to index.
array $schema: The table specification.
\Drupal\Core\Database\Schema::addIndex()
protected function addIndex($table, $name, array $specifier, array $schema) { $schema_handler = $this->database->schema(); $schema_handler->dropIndex($table, $name); $schema_handler->addIndex($table, $name, $specifier, $schema); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Sql!SqlContentEntityStorageSchema.php/function/SqlContentEntityStorageSchema::addIndex/8.1.x