Skip to content
Snippets Groups Projects
Commit 9e101ce9 authored by Paul Mrvik's avatar Paul Mrvik
Browse files

Issue #3476225 by globexplorer: Fix mismatch schema for base fields

parent 349a5d91
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@
* Install, update and uninstall functions for the Conditional Notification module.
*/
use Drupal\Core\Field\BaseFieldDefinition;
/**
* Adds new entity
......@@ -38,6 +40,46 @@ function conditional_notification_update_10002() {
}
/**
* Update entity schema for
* conditional_notification_log.
*/
function conditional_notification_update_10003() {
$storage_entity_date_field_timestamp = BaseFieldDefinition::create('integer')
->setSettings([
'unsigned' => true,
'size' => 'big'
])
->setLabel(t('Entity date field timestamp'));
$storage_entity_date_offset = BaseFieldDefinition::create('integer')
->setSettings([
'unsigned' => true,
'size' => 'big'
])
->setLabel(t('Entity date offset'));
$storage_processed_timestamp = BaseFieldDefinition::create('integer')
->setSettings([
'unsigned' => true,
'size' => 'big'
])
->setLabel(t('Processed on'));
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('entity_date_field_timestamp', 'conditional_notification_log', 'conditional_notification_log', $storage_entity_date_field_timestamp);
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('entity_date_offset', 'conditional_notification_log', 'conditional_notification_log', $storage_entity_date_offset);
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('processed_timestamp', 'conditional_notification_log', 'conditional_notification_log', $storage_processed_timestamp);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment