function system_update_8004 in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/system.install \system_update_8004()
Add a (id, default_langcode, langcode) composite index to entities.
File
- core/modules/ system/ system.install, line 1333 
- Install, update and uninstall functions for the system module.
Code
function system_update_8004() {
  // \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema was changed in
  // https://www.drupal.org/node/2261669 to include a (id, default_langcode,
  // langcode) compound index, but this update function wasn't added until
  // https://www.drupal.org/node/2542748. Regenerate the related schemas to
  // ensure they match the currently expected status.
  $manager = \Drupal::entityDefinitionUpdateManager();
  foreach (array_keys(\Drupal::entityManager()
    ->getDefinitions()) as $entity_type_id) {
    $manager
      ->updateEntityType($manager
      ->getEntityType($entity_type_id));
  }
}