diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index 1ff16ed..303f1d9 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -280,20 +280,6 @@ public function ensureSchemaExists() { * {@inheritdoc} */ public function getSchema() { - $schema = $this->buildSchema(); - $context = array('entity_type' => $this->entityType); - // TODO Document this hook. - $this->moduleHandler()->alter('entity_schema', $schema, $context); - return $schema; - } - - /** - * Builds the database schema for the related entity type. - * - * @return array - * A schema API array. - */ - protected function buildSchema() { return $this->schemaHandler()->getSchema(); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php index b45ed6a..bcfd050 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php @@ -21,8 +21,8 @@ class FeedStorage extends ContentEntityDatabaseStorage implements FeedStorageInt /** * {@inheritdoc} */ - protected function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); $schema['aggregator_feed']['indexes'] += array( 'aggregator_feed__url' => array(array('url', 255)), diff --git a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php index ba47038..8852332 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php @@ -22,8 +22,8 @@ class ItemStorage extends ContentEntityDatabaseStorage implements ItemStorageInt /** * {@inheritdoc} */ - protected function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); $schema['aggregator_item']['indexes'] += array( 'aggregator_item__timestamp' => array('timestamp'), diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorage.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorage.php index 9a43ef2..5578ea5 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorage.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorage.php @@ -16,8 +16,8 @@ class CustomBlockStorage extends ContentEntityDatabaseStorage { /** * {@inheritdoc} */ - public function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); $schema['custom_block']['unique keys'] += array( 'custom_block__info' => array('info'), diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorage.php b/core/modules/comment/lib/Drupal/comment/CommentStorage.php index 1deca65..422bb77 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentStorage.php +++ b/core/modules/comment/lib/Drupal/comment/CommentStorage.php @@ -134,8 +134,8 @@ public function getChildCids(array $comments) { /** * {@inheritdoc} */ - protected function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); unset($schema['comment']['indexes']['field__pid']); unset($schema['comment']['indexes']['field__entity_id']); diff --git a/core/modules/file/lib/Drupal/file/FileStorage.php b/core/modules/file/lib/Drupal/file/FileStorage.php index 0390a3d..f8dd781 100644 --- a/core/modules/file/lib/Drupal/file/FileStorage.php +++ b/core/modules/file/lib/Drupal/file/FileStorage.php @@ -42,8 +42,8 @@ public function retrieveTemporaryFiles() { /** * {@inheritdoc} */ - protected function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); // @todo There should be a 'binary' field type or setting. $schema['file_managed']['fields']['uri']['binary'] = TRUE; diff --git a/core/modules/node/lib/Drupal/node/NodeStorage.php b/core/modules/node/lib/Drupal/node/NodeStorage.php index 1eeaba6..dd73f43 100644 --- a/core/modules/node/lib/Drupal/node/NodeStorage.php +++ b/core/modules/node/lib/Drupal/node/NodeStorage.php @@ -16,8 +16,8 @@ class NodeStorage extends ContentEntityDatabaseStorage { /** * {@inheritdoc} */ - public function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); // @todo Revisit index definitions in https://drupal.org/node/2015277. $schema['node_revision']['indexes'] += array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php index 7ec905d..c103c0b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php @@ -155,8 +155,8 @@ public function resetWeights($vid) { /** * {@inheritdoc} */ - public function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); unset($schema['taxonomy_term_data']['indexes']['field__vid']); unset($schema['taxonomy_term_data']['indexes']['field__description__format']); diff --git a/core/modules/user/lib/Drupal/user/UserStorage.php b/core/modules/user/lib/Drupal/user/UserStorage.php index c9dcc53..6cbbab3 100644 --- a/core/modules/user/lib/Drupal/user/UserStorage.php +++ b/core/modules/user/lib/Drupal/user/UserStorage.php @@ -159,8 +159,8 @@ public function updateLastLoginTimestamp(UserInterface $account) { /** * {@inheritdoc} */ - public function buildSchema() { - $schema = parent::buildSchema(); + public function getSchema() { + $schema = parent::getSchema(); // The "users" table does not use serial identifiers. $schema['users']['fields']['uid']['type'] = 'int';