// Check that the fields required by a revisionable and translatable
// entity type exist.
if ($entity_type->
isRevisionable() &&
$entity_type->
isTranslatable() && !
isset($field_storage_definitions[$entity_type->
getKey('revision_translation_affected'
)])) { throw new EntityStorageException('Missing revision_translation_affected field.'
);
} $this->
preUpdateEntityTypeSchema($entity_type,
$original,
$field_storage_definitions,
$original_field_storage_definitions,
$sandbox);
} // Copy data from the original storage to the temporary one.
if ($has_data) { $this->
copyData($entity_type,
$original,
$field_storage_definitions,
$original_field_storage_definitions,
$sandbox);
} else { // If there is no existing data, we still need to run the
// post-schema-update tasks.
$sandbox['#finished'
] = 1;
} // If the data copying has finished successfully, allow the storage schema
// to do any required cleanup tasks. For example, this process should take
// care of transforming the temporary storage into the current storage.
if ($sandbox['#finished'
] == 1
) {