diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index e23d031..075d875 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -330,6 +330,10 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI // Create new indexes and unique keys. $entity_schema = $this->getEntitySchema($entity_type, TRUE); foreach ($this->getEntitySchemaData($entity_type, $entity_schema) as $table_name => $schema) { + // Add fields schema because database driver may depend on this data to + // perform index normalization. + $schema['fields'] = $entity_type[$table_name]['fields']; + if (!empty($schema['indexes'])) { foreach ($schema['indexes'] as $name => $specifier) { $schema_handler->addIndex($table_name, $name, $specifier, $schema);