FontStorageSchema.php in @font-your-face 8.3
File
src/FontStorageSchema.php
View source
<?php
namespace Drupal\fontyourface;
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema;
class FontStorageSchema extends SqlContentEntityStorageSchema {
protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
$schema = parent::getEntitySchema($entity_type, $reset);
$schema['fontyourface_font']['indexes'] += [
'name' => [
'name',
],
'pid' => [
'pid',
],
];
$schema['fontyourface_font']['unique keys'] += [
'url' => [
'url',
],
];
return $schema;
}
}