You are here

public function EntityDefinitionUpdateManager::applyUpdates in Drupal 8

Applies all the detected valid changes.

Use this with care, as it will apply updates for any module, which will lead to unpredictable results.

Throws

\Drupal\Core\Entity\EntityStorageException This exception is thrown if a change cannot be applied without unacceptable data loss. In such a case, the site administrator needs to apply some other process, such as a custom update function or a migration via the Migrate module.

Overrides EntityDefinitionUpdateManagerInterface::applyUpdates

Deprecated

in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface::getChangeList() and execute each entity type and field storage update manually instead.

See also

https://www.drupal.org/node/3034742

File

core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 174

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function applyUpdates() {
  trigger_error('EntityDefinitionUpdateManagerInterface::applyUpdates() is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Core\\Entity\\EntityDefinitionUpdateManagerInterface::getChangeList() and execute each entity type and field storage update manually instead. See https://www.drupal.org/node/3034742.', E_USER_DEPRECATED);
}