function block_content_update_10300

Apply index to reusable column.

File

core/modules/block_content/block_content.install, line 58

Code

function block_content_update_10300() : void {
  $manager = \Drupal::entityDefinitionUpdateManager();
  $entity_type = $manager->getEntityType('block_content')
    ->setHandlerClass('storage_schema', BlockContentStorageSchema::class);
  $manager->updateEntityType($entity_type);
  $manager->updateFieldStorageDefinition(\Drupal::service('entity_field.manager')->getBaseFieldDefinitions('block_content')['reusable']);
}

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