Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / node / src / NodeStorageSchema.php
index ac45bb5d1ef408a78f306bcbc3975f87b2417aca..b70392ac05c10ef1c5c9119177c3356f95ca7118 100644 (file)
@@ -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;
   }