RedirectStorageSchema.php in Redirect 8
File
src/RedirectStorageSchema.php
View source
<?php
namespace Drupal\redirect;
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema;
class RedirectStorageSchema extends SqlContentEntityStorageSchema {
protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
$schema = parent::getEntitySchema($entity_type, $reset);
$schema['redirect']['unique keys'] += [
'hash' => [
'hash',
],
];
$schema['redirect']['indexes'] += [
'source_language' => [
[
'redirect_source__path',
191,
],
'language',
],
];
return $schema;
}
}