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
1 2 3 4 5 6 7 8 9 10 11 12 | 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.