diff --git a/core/includes/database.inc b/core/includes/database.inc
index 98041cd..9afce7c 100644
--- a/core/includes/database.inc
+++ b/core/includes/database.inc
@@ -654,6 +654,9 @@ function db_drop_unique_key($table, $name) {
  *   The name of the index.
  * @param $fields
  *   An array of field names.
+ *
+ * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0.
+ *   Use \Drupal\Core\Database\Schema::addNormalizedIndex() instead.
  */
 function db_add_index($table, $name, $fields) {
   return Database::getConnection()->schema()->addIndex($table, $name, $fields);
diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
index 8f5b710..ea26c10 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
@@ -306,7 +306,7 @@ protected function createKeysSql($spec) {
    *   List of shortened indexes.
    */
   protected function getNormalizedIndexes($spec) {
-    $indexes = $spec['indexes'];
+    $indexes = parent::getNormalizedIndexes($spec);
     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.
@@ -497,6 +497,21 @@ public function addIndex($table, $name, $fields) {
     $this->connection->query('ALTER TABLE {' . $table . '} ADD INDEX `' . $name . '` (' . $this->createKeySql($fields) . ')');
   }
 
+  public function addNormalizedIndex($table, $name, $spec) {
+    $indexes = $this->getNormalizedIndexes($spec);
+    if (!isset($indexes[$name])) {
+      throw new SchemaIndexNotInSpecException(t("The index @name doesn't exist in the @table table specification.", array('@table' => $table, '@name' => $name)));
+    }
+    if (!$this->tableExists($table)) {
+      throw new SchemaObjectDoesNotExistException(t("Cannot add index @name to table @table: table doesn't exist.", array('@table' => $table, '@name' => $name)));
+    }
+    if ($this->indexExists($table, $name)) {
+      throw new SchemaObjectExistsException(t("Cannot add index @name to table @table: index already exists.", array('@table' => $table, '@name' => $name)));
+    }
+
+    $this->connection->query('ALTER TABLE {' . $table . '} ADD INDEX `' . $name . '` (' . $this->createKeySql($indexes[$name]) . ')');
+  }
+
   public function dropIndex($table, $name) {
     if (!$this->indexExists($table, $name)) {
       return FALSE;
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
index e3062dd..70c7e53 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
@@ -649,6 +649,22 @@ public function addIndex($table, $name, $fields) {
     $this->resetTableInformation($table);
   }
 
+  public function addNormalizedIndex($table, $name, $spec) {
+    $indexes = $this->getNormalizedIndexes($spec);
+    if (!isset($indexes[$name])) {
+      throw new SchemaIndexNotInSpecException(t("The index @name doesn't exist in the @table table specification.", array('@table' => $table, '@name' => $name)));
+    }
+    if (!$this->tableExists($table)) {
+      throw new SchemaObjectDoesNotExistException(t("Cannot add index @name to table @table: table doesn't exist.", array('@table' => $table, '@name' => $name)));
+    }
+    if ($this->indexExists($table, $name)) {
+      throw new SchemaObjectExistsException(t("Cannot add index @name to table @table: index already exists.", array('@table' => $table, '@name' => $name)));
+    }
+
+    $this->connection->query($this->_createIndexSql($table, $name, $indexes[$name]));
+    $this->resetTableInformation($table);
+  }
+
   public function dropIndex($table, $name) {
     if (!$this->indexExists($table, $name)) {
       return FALSE;
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
index 3ac3811..301466c 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
@@ -597,6 +597,25 @@ public function addIndex($table, $name, $fields) {
     }
   }
 
+  public function addNormalizedIndex($table, $name, $spec) {
+    $indexes = $this->getNormalizedIndexes($spec);
+    if (!isset($indexes[$name])) {
+     throw new SchemaIndexNotInSpecException(t("The index @name doesn't exist in the @table table specification.", array('@table' => $table, '@name' => $name)));
+    }
+    if (!$this->tableExists($table)) {
+      throw new SchemaObjectDoesNotExistException(t("Cannot add index @name to table @table: table doesn't exist.", array('@table' => $table, '@name' => $name)));
+    }
+    if ($this->indexExists($table, $name)) {
+      throw new SchemaObjectExistsException(t("Cannot add index @name to table @table: index already exists.", array('@table' => $table, '@name' => $name)));
+    }
+
+    $schema['indexes'][$name] = $indexes[$name];
+    $statements = $this->createIndexSql($table, $schema);
+    foreach ($statements as $statement) {
+      $this->connection->query($statement);
+    }
+  }
+
   public function indexExists($table, $name) {
     $info = $this->getPrefixInfo($table);
 
diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php
index 4ebfd40..2d416a2 100644
--- a/core/lib/Drupal/Core/Database/Schema.php
+++ b/core/lib/Drupal/Core/Database/Schema.php
@@ -418,10 +418,48 @@ public function fieldExists($table, $column) {
    *   If the specified table doesn't exist.
    * @throws \Drupal\Core\Database\SchemaObjectExistsException
    *   If the specified table already has an index by that name.
+   *
+   * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0.
+   *   Use \Drupal\Core\Database\Schema::addNormalizedIndex() instead.
    */
   abstract public function addIndex($table, $name, $fields);
 
   /**
+   * Add an index based on a table specification.
+   *
+   * Normalizes the index to database requirements, limiting the
+   * length if necessary.
+   *
+   * @param $table
+   *   The table to be altered.
+   * @param $name
+   *   The name of the index.
+   * @param $spec
+   *   A table specification.
+   *
+   * @throws \Drupal\Core\Database\SchemaIndexNotInSpecException
+   *   If the specified index doesn't exist in the table spec.
+   * @throws \Drupal\Core\Database\SchemaObjectDoesNotExistException
+   *   If the specified table doesn't exist.
+   * @throws \Drupal\Core\Database\SchemaObjectExistsException
+   *   If the specified table already has an index by that name.
+   */
+  abstract public function addNormalizedIndex($table, $name, $spec);
+
+  /**
+   * Gets normalized indexes from a table specification.
+   *
+   * @param $spec
+   *   The table specification.
+   *
+   * @return array
+   *   List of shortened indexes.
+   */
+  protected 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..6f433f8 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -333,7 +333,7 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
       foreach ($this->getEntitySchemaData($entity_type, $entity_schema) as $table_name => $schema) {
         if (!empty($schema['indexes'])) {
           foreach ($schema['indexes'] as $name => $specifier) {
-            $schema_handler->addIndex($table_name, $name, $specifier);
+            $schema_handler->addNormalizedIndex($table_name, $name, $schema);
           }
         }
         if (!empty($schema['unique keys'])) {
@@ -1140,7 +1140,7 @@ protected function createSharedTableSchema(FieldStorageDefinitionInterface $stor
                 // 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)) {
-                  $schema_handler->addIndex($table_name, $name, $specifier);
+                  $schema_handler->addNormalizedIndex($table_name, $name, $schema);
                 }
               }
             }
@@ -1286,6 +1286,7 @@ protected function updateDedicatedTableSchema(FieldStorageDefinitionInterface $s
       }
       $table = $table_mapping->getDedicatedDataTableName($storage_definition);
       $revision_table = $table_mapping->getDedicatedRevisionTableName($storage_definition);
+      $schema_copy = $schema;
       foreach ($schema['indexes'] as $name => $columns) {
         if (!isset($original_schema['indexes'][$name]) || $columns != $original_schema['indexes'][$name]) {
           $real_name = $this->getFieldIndexName($storage_definition, $name);
@@ -1303,8 +1304,9 @@ protected function updateDedicatedTableSchema(FieldStorageDefinitionInterface $s
               $real_columns[] = $table_mapping->getFieldColumnName($storage_definition, $column_name);
             }
           }
-          $this->database->schema()->addIndex($table, $real_name, $real_columns);
-          $this->database->schema()->addIndex($revision_table, $real_name, $real_columns);
+          $schema_copy['indexes'][$real_name] = $real_columns;
+          $this->database->schema()->addNormalizedIndex($table, $real_name, $schema_copy);
+          $this->database->schema()->addNormalizedIndex($revision_table, $real_name, $schema_copy);
         }
       }
       $this->saveFieldSchemaData($storage_definition, $this->getDedicatedTableSchema($storage_definition));
@@ -1381,7 +1383,7 @@ 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) {
-                $schema_handler->addIndex($table_name, $name, $specifier);
+                $schema_handler->addNormalizedIndex($table_name, $name, $schema);
               }
             }
             if (!empty($schema[$table_name]['unique keys'])) {
