protected Schema::mapKeyDefinition(array $key_definition, array $mapping)
Utility method: rename columns in an index definition according to a new mapping.
Parameters
$key_definition: The key definition.
$mapping: The new mapping.
File
- core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 586
Class
- Schema
- SQLite implementation of \Drupal\Core\Database\Schema.
Namespace
Drupal\Core\Database\Driver\sqlite
Code
protected function mapKeyDefinition(array $key_definition, array $mapping) { foreach ($key_definition as &$field) { // The key definition can be an array($field, $length). if (is_array($field)) { $field = &$field[0]; } if (isset($mapping[$field])) { $field = $mapping[$field]; } } return $key_definition; }
Please login to continue.