X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fsrc%2FContentModerationStateStorageSchema.php;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fsrc%2FContentModerationStateStorageSchema.php;h=24754870458de875f4994d1c8b30afc479aad52d;hp=869a10bfac94c4ddfa312a9a44514d52b9f81634;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/content_moderation/src/ContentModerationStateStorageSchema.php b/web/core/modules/content_moderation/src/ContentModerationStateStorageSchema.php index 869a10bfa..247548704 100644 --- a/web/core/modules/content_moderation/src/ContentModerationStateStorageSchema.php +++ b/web/core/modules/content_moderation/src/ContentModerationStateStorageSchema.php @@ -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; }