You are here

function workspace_update_8108 in Workspace 8

Add the fail_info field.

File

./workspace.install, line 182
Install, update and uninstall functions for the workspace module.

Code

function workspace_update_8108() {
  $definition_update_manager = \Drupal::entityDefinitionUpdateManager();

  // Add the replication status field to the replication entity type.
  $replication_fail_info = BaseFieldDefinition::create('string_long')
    ->setLabel(t('Replication fail info'))
    ->setDescription(t('When a replication fails, it contains the info about the cause of the fail.'))
    ->setRequired(FALSE)
    ->setDefaultValue('')
    ->setInitialValue('');
  $definition_update_manager
    ->installFieldStorageDefinition('fail_info', 'replication', 'workspace', $replication_fail_info);
}