X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fnode%2Fsrc%2FNodeStorageSchema.php;fp=web%2Fcore%2Fmodules%2Fnode%2Fsrc%2FNodeStorageSchema.php;h=b70392ac05c10ef1c5c9119177c3356f95ca7118;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=ac45bb5d1ef408a78f306bcbc3975f87b2417aca;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/node/src/NodeStorageSchema.php b/web/core/modules/node/src/NodeStorageSchema.php index ac45bb5d1..b70392ac0 100644 --- a/web/core/modules/node/src/NodeStorageSchema.php +++ b/web/core/modules/node/src/NodeStorageSchema.php @@ -17,10 +17,12 @@ class NodeStorageSchema extends SqlContentEntityStorageSchema { protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) { $schema = parent::getEntitySchema($entity_type, $reset); - $schema['node_field_data']['indexes'] += [ - 'node__frontpage' => ['promote', 'status', 'sticky', 'created'], - 'node__title_type' => ['title', ['type', 4]], - ]; + if ($data_table = $this->storage->getDataTable()) { + $schema[$data_table]['indexes'] += [ + 'node__frontpage' => ['promote', 'status', 'sticky', 'created'], + 'node__title_type' => ['title', ['type', 4]], + ]; + } return $schema; }