summaryrefslogtreecommitdiffstats
path: root/core/modules/node/node.install
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node/node.install')
-rw-r--r--core/modules/node/node.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index 720a7e0..2751b2c 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -222,6 +222,11 @@ function node_update_8003() {
}
/**
+ * @addtogroup updates-8.3.x
+ * @{
+ */
+
+/**
* Change {node_access}.fallback from an int to a tinyint as it is a boolean.
*/
function node_update_8300() {
@@ -234,3 +239,19 @@ function node_update_8300() {
'size' => 'tiny',
]);
}
+
+/**
+ * Set the 'published' entity key.
+ */
+function node_update_8301() {
+ $definition_update_manager = \Drupal::entityDefinitionUpdateManager();
+ $entity_type = $definition_update_manager->getEntityType('node');
+ $keys = $entity_type->getKeys();
+ $keys['published'] = 'status';
+ $entity_type->set('entity_keys', $keys);
+ $definition_update_manager->updateEntityType($entity_type);
+}
+
+/**
+ * @} End of "addtogroup updates-8.3.x".
+ */