added update hook for total cases field

This commit is contained in:
naomi 2022-05-19 09:12:31 +01:00
parent f671580ed7
commit a5132bbcfc

View File

@ -1,6 +1,17 @@
<?php
use \Drupal\Core\Field\BaseFieldDefinition;
function opencase_cases_update_90005() {
$field_storage_definition = BaseFieldDefinition::create('integer')
->setLabel(t('Number of Cases'))
->setRevisionable(TRUE)
->setDisplayConfigurable('view', true);
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('total_cases', 'oc_actor', 'opencase_cases', $field_storage_definition);
}
function opencase_cases_update_90004() {
$field_storage_definition = BaseFieldDefinition::create('string_long')
->setRevisionable(TRUE)