function taxonomy_update_8501

Convert the custom taxonomy term hierarchy storage to a default storage.

File

core/modules/taxonomy/taxonomy.install, line 49

Code

function taxonomy_update_8501() {
    $definition_update_manager = \Drupal::entityDefinitionUpdateManager();
    
    /** @var \Drupal\Core\Field\BaseFieldDefinition $field_storage_definition */
    $field_storage_definition = $definition_update_manager->getFieldStorageDefinition('parent', 'taxonomy_term');
    $field_storage_definition->setCustomStorage(FALSE);
    $definition_update_manager->updateFieldStorageDefinition($field_storage_definition);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.