diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
index 8f5b710..a78cca2 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
@@ -294,19 +294,13 @@ protected function createKeysSql($spec) {
   }
 
   /**
-   * Gets normalized indexes from a table specification.
+   * {@inheritdoc}
    *
    * Shortens indexes to 191 characters if they apply to utf8mb4-encoded
    * fields, in order to comply with the InnoDB index limitation of 756 bytes.
-   *
-   * @param $spec
-   *   The table specification.
-   *
-   * @return array
-   *   List of shortened indexes.
    */
-  protected function getNormalizedIndexes($spec) {
-    $indexes = $spec['indexes'];
+  public function getNormalizedIndexes($spec) {
+    $indexes = isset($spec['indexes']) ? $spec['indexes'] : [];
     foreach ($indexes as $index_name => $index_fields) {
       foreach ($index_fields as $index_key => $index_field) {
         // Get the name of the field from the index specification.
diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php
index 4ebfd40..4dcc2e2 100644
--- a/core/lib/Drupal/Core/Database/Schema.php
+++ b/core/lib/Drupal/Core/Database/Schema.php
@@ -422,6 +422,19 @@ public function fieldExists($table, $column) {
   abstract public function addIndex($table, $name, $fields);
 
   /**
+   * Gets normalized indexes from a table specification.
+   *
+   * @param $spec
+   *   The table specification.
+   *
+   * @return array
+   *   List of shortened indexes.
+   */
+  public function getNormalizedIndexes($spec) {
+    return isset($spec['indexes']) ? $spec['indexes'] : [];
+  }
+
+  /**
    * Drop an index.
    *
    * @param $table
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
index 24f4650..36055cc 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -332,7 +332,8 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
       $entity_schema = $this->getEntitySchema($entity_type, TRUE);
       foreach ($this->getEntitySchemaData($entity_type, $entity_schema) as $table_name => $schema) {
         if (!empty($schema['indexes'])) {
-          foreach ($schema['indexes'] as $name => $specifier) {
+          $indexes = $schema_handler->getNormalizedIndexes($schema);
+          foreach ($indexes as $name => $specifier) {
             $schema_handler->addIndex($table_name, $name, $specifier);
           }
         }
@@ -1136,7 +1137,8 @@ protected function createSharedTableSchema(FieldStorageDefinitionInterface $stor
               }
             }
             if (!empty($schema[$table_name]['indexes'])) {
-              foreach ($schema[$table_name]['indexes'] as $name => $specifier) {
+              $indexes = $schema_handler->getNormalizedIndexes($schema);
+              foreach ($indexes as $name => $specifier) {
                 // Check if the index exists because it might already have been
                 // created as part of the earlier entity type update event.
                 if (!$schema_handler->indexExists($table_name, $name)) {
@@ -1286,7 +1288,8 @@ protected function updateDedicatedTableSchema(FieldStorageDefinitionInterface $s
       }
       $table = $table_mapping->getDedicatedDataTableName($storage_definition);
       $revision_table = $table_mapping->getDedicatedRevisionTableName($storage_definition);
-      foreach ($schema['indexes'] as $name => $columns) {
+      $indexes = $this->database->schema()->getNormalizedIndexes($schema);
+      foreach ($indexes as $name => $columns) {
         if (!isset($original_schema['indexes'][$name]) || $columns != $original_schema['indexes'][$name]) {
           $real_name = $this->getFieldIndexName($storage_definition, $name);
           $real_columns = array();
@@ -1380,7 +1383,8 @@ protected function updateSharedTableSchema(FieldStorageDefinitionInterface $stor
             }
             // Create new indexes and unique keys.
             if (!empty($schema[$table_name]['indexes'])) {
-              foreach ($schema[$table_name]['indexes'] as $name => $specifier) {
+              $indexes = $schema_handler->getNormalizedIndexes($schema);
+              foreach ($indexes as $name => $specifier) {
                 $schema_handler->addIndex($table_name, $name, $specifier);
               }
             }
