X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fcomment.install;fp=web%2Fcore%2Fmodules%2Fcomment%2Fcomment.install;h=c244fe4ce8b9dfb1be00cd22b5fc8a79f6b86823;hp=47241c281ddcab774860ad22689403184dd95e29;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/comment/comment.install b/web/core/modules/comment/comment.install index 47241c281..c244fe4ce 100644 --- a/web/core/modules/comment/comment.install +++ b/web/core/modules/comment/comment.install @@ -184,3 +184,14 @@ function comment_update_8301() { $entity_type->set('entity_keys', $keys); $definition_update_manager->updateEntityType($entity_type); } + +/** + * Update the status field. + */ +function comment_update_8400() { + // The status field was promoted to an entity key in comment_update_8301(), + // which makes it NOT NULL in the default SQL storage, which means its storage + // definition needs to be updated as well. + $entity_definition_update_manager = \Drupal::service('entity.definition_update_manager'); + $entity_definition_update_manager->updateFieldStorageDefinition($entity_definition_update_manager->getFieldStorageDefinition('status', 'comment')); +}