Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / content_moderation / src / ContentModerationStateStorageSchema.php
index 869a10bfac94c4ddfa312a9a44514d52b9f81634..24754870458de875f4994d1c8b30afc479aad52d 100644 (file)
@@ -25,12 +25,16 @@ class ContentModerationStateStorageSchema extends SqlContentEntityStorageSchema
       'workflow',
       'langcode',
     ];
-    $schema['content_moderation_state_field_data']['unique keys'] += [
-      'content_moderation_state__lookup' => $unique_keys,
-    ];
-    $schema['content_moderation_state_field_revision']['unique keys'] += [
-      'content_moderation_state__lookup' => $unique_keys,
-    ];
+    if ($data_table = $this->storage->getDataTable()) {
+      $schema[$data_table]['unique keys'] += [
+        'content_moderation_state__lookup' => $unique_keys,
+      ];
+    }
+    if ($revision_data_table = $this->storage->getRevisionDataTable()) {
+      $schema[$revision_data_table]['unique keys'] += [
+        'content_moderation_state__lookup' => $unique_keys,
+      ];
+    }
 
     return $schema;
   }