function crop_update_8005 in Crop API 8.2
Add index on type and uri.
File
- ./
crop.install, line 103 - Install, update and uninstall functions for the Crop API module.
Code
function crop_update_8005() {
$manager = \Drupal::entityDefinitionUpdateManager();
// Get the current crop entity type definition, ensure the storage schema
// class is set.
$entity_type = $manager
->getEntityType('crop')
->setHandlerClass('storage_schema', CropStorageSchema::class);
// Regenerate entity type indexes.
$manager
->updateEntityType($entity_type);
}