Define fields created through the UI as non-revisionable on a revisionable entity Let's say, I have a revisionable entity. Whether base fields should be revisionable or not can be set in the code. So far, so good.
But how about those fields that get added through the user interface? Is there a way to set all the fields as either revisionable or non-revisionable? Or is there a way to set this for each field individually in the UI?
By default, all the entity fields created from the user interface are set as revisionable, and the user interface doesn't allow to set a field as not revisionable. That information is added from field_entity_field_storage_info(), which contains the following code.
$ids = \Drupal::entityQuery('field_storage_config')
  -&gt;condition('id', $entity_type-&gt;id() . '.', 'STARTS_WITH')
  -&gt;execute();

// Fetch all fields and key them by field name.
$field_storages = FieldStorageConfig::loadMultiple($ids);
$result = [];
foreach ($field_storages as $field_storage) {
  $result[$field_storage-&gt;getName()] = $field_storage;
}
return $result;

FieldStorageConfig::isRevisionable() always returns TRUE.
public function isRevisionable() {
  // All configurable fields are revisionable.
  return TRUE;
}

To make a configurable field not revisionable, a module should implement hook_entity_field_storage_info_alter() and alter the $field_storage values returned from field_entity_field_storage_info().
  function mymodule_entity_field_storage_info_alter(&amp;$fields, $entity_type) {
    $ids = \Drupal::entityQuery('field_storage_config')-&gt;condition('id', $entity_type-&gt;id() . '.', 'STARTS_WITH')
      -&gt;execute();

    // Fetch all fields and key them by field name.
    $field_storages = FieldStorageConfig::loadMultiple($ids);
    $result = [];
    foreach ($field_storages as $field_storage) {
      $result[$field_storage-&gt;getName()] = // Replace $field_storage with an object implementing FieldStorageDefinitionInterface and returning the value you want with isRevisionable().
    }
    return $result;
  }