diff --git b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 29c6aebb41..6763aad83b 100644 --- b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1668,15 +1668,10 @@ protected function updateSharedTableSchema(FieldStorageDefinitionInterface $stor } } // Create new primary key, indexes and unique keys. - // The entity schema needs to be checked because the field schema is - // potentially incomplete. - // @todo Remove this in - // https://www.drupal.org/project/drupal/issues/2929120 - $entity_schema = $this->getEntitySchema($this->entityType); foreach ($schema[$table_name]['fields'] as $name => $specifier) { // Check if the field is part of the primary keys. - if (isset($entity_schema[$table_name]['primary key']) && array_intersect($column_names, $entity_schema[$table_name]['primary key'])) { - $schema_handler->addPrimaryKey($table_name, $entity_schema[$table_name]['primary key']); + if (isset($schema[$table_name]['primary key']) && array_intersect($column_names, $schema[$table_name]['primary key'])) { + $schema_handler->addPrimaryKey($table_name, $schema[$table_name]['primary key']); // If the field being updated is a serial field, it will have // been changed to an integer field by