// If shared table schema changes are needed, we can't proceed.
if (!
class_exists($original->
getStorageClass()) ||
$this->
hasSharedTableStructureChange($entity_type,
$original)) { throw new EntityStorageException('It is not possible to change the entity type schema outside of a batch context. Use EntityDefinitionUpdateManagerInterface::updateFieldableEntityType() instead.'
);
} // Drop original indexes and unique keys.
$this->
deleteEntitySchemaIndexes($this->
loadEntitySchemaData($entity_type));
// Create new indexes and unique keys.
$entity_schema =
$this->
getEntitySchema($entity_type, TRUE
);
$this->
createEntitySchemaIndexes($entity_schema);
// Store the updated entity schema.
$this->
saveEntitySchemaData($entity_type,
$entity_schema);
} /**
* {@inheritdoc}
*/
public function onEntityTypeDelete(EntityTypeInterface
$entity_type) { $this->
checkEntityType($entity_type);
$schema_handler =
$this->database->
schema();