entity_abuse-1.1.x-dev/src/EntityAbuseReportStorageSchema.php
src/EntityAbuseReportStorageSchema.php
<?php
namespace Drupal\entity_abuse;
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema;
/**
* Defines the entity_abuse schema handler.
*/
class EntityAbuseReportStorageSchema extends SqlContentEntityStorageSchema {
/**
* {@inheritdoc}
*/
protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
$schema = parent::getEntitySchema($entity_type, $reset);
if ($base_table = $this->storage->getBaseTable()) {
$schema[$base_table]['indexes'] += [
'entity_id__entity_type' => ['entity_id', 'entity_type'],
];
}
return $schema;
}
}
