function tmgmt_update_8011

Add the file count field.

File

./tmgmt.install, line 152
Update function for the tmgmt module.

Code

function tmgmt_update_8011() {
  $storage_definition = BaseFieldDefinition::create('integer')
    ->setLabel(t('File count'))
    ->setSetting('unsigned', TRUE)
    ->setInitialValue(0);
  \Drupal::entityDefinitionUpdateManager()
    ->installFieldStorageDefinition('file_count', 'tmgmt_job_item', 'tmgmt', $storage_definition);
}