function data_policy_update_8006 in Data Policy 8
Add the "required" field to the user_consent entity.
File
- ./
data_policy.install, line 154 - Install, update and uninstall functions for the data_policy module.
Code
function data_policy_update_8006() {
$field_storage_definition = BaseFieldDefinition::create('boolean')
->setLabel(t('Required'));
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('required', 'user_consent', 'data_policy', $field_storage_definition);
}