// If no schema changes are needed, we don't need to do anything.
if(!$this->requiresEntityStorageSchemaChanges($entity_type, $original)){ return; }
// If shared table schema changes are needed, we can't proceed.
if(!class_exists($original->getStorageClass()) || $this->hasSharedTableStructureChange($entity_type, $original)){ thrownewEntityStorageException('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));