diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 58e3246..78e1678 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1637,8 +1637,10 @@ protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $st // NULL. if ($table_name == $base_table) { unset($not_null_keys['revision']); - unset($not_null_keys['latest_revision']); } + // The latest revision key is stored in the data table and is also updated + // after a revision has been created. + unset($not_null_keys['latest_revision']); foreach ($column_mapping as $field_column_name => $schema_field_name) { $column_schema = $field_schema['columns'][$field_column_name];