maestro-3.0.1-rc2/src/MaestroStorageSchema.php
src/MaestroStorageSchema.php
<?php
namespace Drupal\maestro;
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema;
/**
* Defines the maestro schema handler.
*/
class MaestroStorageSchema extends SqlContentEntityStorageSchema {
/**
* {@inheritdoc}
*/
protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
$schema = parent::getEntitySchema($entity_type, $reset);
if ($data_table = $this->storage->getDataTable()) {
$schema[$data_table]['indexes'] += [
'token' => ['token',['type', 3]],
];
}
return $schema;
}
}
