diff -u b/replication.install b/replication.install --- b/replication.install +++ b/replication.install @@ -4,8 +4,8 @@ use Drupal\Core\Database\Database; /** - * Create revisionable fields in the revision table for replication_log - * entity type if they are missing. + * Create revisionable fields in the revision table for replication_log entity + * type if they are missing. */ function replication_update_8100() { $connection = Database::getConnection(); @@ -29,8 +29,6 @@ $table_base = ($entity_type->isTranslatable()) ? $entity_type->getDataTable() : $entity_type->getBaseTable(); $table_revision = ($entity_type->isTranslatable()) ? $entity_type->getRevisionDataTable() : $entity_type->getRevisionTable(); - // Block content definition doesn't include the revision field table. - // So get it. /** @var \Drupal\Core\Entity\Sql\TableMappingInterface $table_mapping */ $table_mapping = $storage->getTableMapping(); $tables = $table_mapping->getTableNames(); @@ -42,7 +40,7 @@ $table_revision = $entity_type_id . '_revision'; } - if ($schema->tableExists($table_base) && $table_revision) { + if ($schema->tableExists($table_base) && $table_revision && $schema->tableExists($table_revision)) { // Get data from base table. $table_base_results = $connection->select($table_base) ->fields($table_base)