You are here

function comment_update_8300 in Drupal 8

Update status field.

File

core/modules/comment/comment.install, line 195
Install, update and uninstall functions for the Comment module.

Code

function comment_update_8300() {
  $entity_definition_update_manager = \Drupal::service('entity.definition_update_manager');
  $field_definition = $entity_definition_update_manager
    ->getFieldStorageDefinition('status', 'comment');
  $field_definition
    ->setDescription(new TranslatableMarkup('A boolean indicating the published state.'))
    ->setRevisionable(TRUE);
  $entity_definition_update_manager
    ->updateFieldStorageDefinition($field_definition);
}