protected function ParagraphStorageSchema::getEntitySchema

File

paragraphs/src/ParagraphStorageSchema.php, line 17

Class

ParagraphStorageSchema
Extends the paragraphs schema handler.

Namespace

Drupal\paragraphs

Code

protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
  $schema = parent::getEntitySchema($entity_type, $reset);
  $schema[$this->storage
    ->getDataTable()]['indexes'] += array(
    'paragraphs__parent_fields' => array(
      'parent_type',
      'parent_id',
      'parent_field_name',
    ),
  );
  $schema[$this->storage
    ->getRevisionDataTable()]['indexes'] += array(
    'paragraphs__parent_fields' => array(
      'parent_type',
      'parent_id',
      'parent_field_name',
    ),
  );
  return $schema;
}