Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / tests / modules / entity_test_schema_converter / entity_test_schema_converter.post_update.php
1 <?php
2
3 /**
4  * @file
5  * Post update functions for entity_test_schema_converter.
6  */
7
8 use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
9
10 /**
11  * @addtogroup updates-8.4.x
12  * @{
13  */
14
15 /**
16  * Update entity_test_update to be revisionable.
17  */
18 function entity_test_schema_converter_post_update_make_revisionable(&$sandbox) {
19   $revisionableSchemaConverter = new SqlContentEntityStorageSchemaConverter(
20     'entity_test_update',
21     \Drupal::entityTypeManager(),
22     \Drupal::entityDefinitionUpdateManager(),
23     \Drupal::service('entity.last_installed_schema.repository'),
24     \Drupal::keyValue('entity.storage_schema.sql'),
25     \Drupal::database()
26   );
27
28   $revisionableSchemaConverter->convertToRevisionable(
29     $sandbox,
30     [
31       'test_single_property',
32       'test_multiple_properties',
33       'test_single_property_multiple_values',
34       'test_multiple_properties_multiple_values',
35       'test_entity_base_field_info',
36     ]);
37 }
38
39 /**
40  * @} End of "addtogroup updates-8.4.x".
41  */