function drush_lightning_core_pre_updatedb in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 lightning_core.drush.inc \drush_lightning_core_pre_updatedb()
- 8.2 lightning_core.drush.inc \drush_lightning_core_pre_updatedb()
- 8.3 lightning_core.drush.inc \drush_lightning_core_pre_updatedb()
Implements drush_hook_pre_COMMAND().
File
- ./
lightning_core.drush.inc, line 23 - Drush integration for Lightning.
Code
function drush_lightning_core_pre_updatedb() {
// A common cause of errors during database updates is update hooks referring
// to new or changed plugin definitions. Clearing all plugin caches before
// updates begin ensures that the plugin system always has the latest plugin
// definitions to work with.
if (Drupal::hasContainer()) {
Drupal::service('plugin.cache_clearer')
->clearCachedDefinitions();
}
}