Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
conditional_notification
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
conditional_notification
Commits
9e101ce9
Commit
9e101ce9
authored
7 months ago
by
Paul Mrvik
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
conditional_notification.install
+42
-0
42 additions, 0 deletions
conditional_notification.install
with
42 additions
and
0 deletions
conditional_notification.install
+
42
−
0
View file @
9e101ce9
...
...
@@ -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
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment