diff --git a/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php b/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php index 0ddcfba..a45a908 100644 --- a/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php +++ b/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php @@ -153,11 +153,11 @@ protected function copyData(array &$sandbox) { $entity_type = $sandbox['entity_type']; // If 'progress' is not set, then this will be the first run of the batch. - $base_table = $temporary_entity_type->getBaseTable(); + $temporary_base_table = $temporary_entity_type->getBaseTable(); if (!isset($sandbox['progress'])) { $sandbox['progress'] = 0; $sandbox['current_id'] = 0; - $sandbox['max'] = $this->database->select($base_table) + $sandbox['max'] = $this->database->select($temporary_base_table) ->countQuery() ->execute() ->fetchField(); @@ -166,8 +166,8 @@ protected function copyData(array &$sandbox) { $id = $temporary_entity_type->getKey('id'); // Get the next 10 entity IDs to migrate. - $entity_ids = $this->database->select($base_table) - ->fields($base_table, [$id]) + $entity_ids = $this->database->select($temporary_base_table) + ->fields($temporary_base_table, [$id]) ->condition($id, $sandbox['current_id'], '>') ->range(0, 10) ->execute() diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 5ea3880..b104899 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1192,7 +1192,7 @@ protected function createSharedTableSchema(FieldStorageDefinitionInterface $stor foreach ($schema[$table_name]['fields'] as $name => $specifier) { // Use the value of the entity ID as the initial value for the // revision ID field. - if($created_field_name == $this->entityType->getKey('revision')) { + if ($created_field_name == $this->entityType->getKey('revision')) { $id_column_name = $table_mapping->getColumnNames($this->entityType->getKey('id')); $specifier['initial_from_field'] = reset($id_column_name); } @@ -1247,9 +1247,9 @@ protected function deleteDedicatedTableSchema(FieldStorageDefinitionInterface $s $this->database->schema()->dropTable($table_name); } if ($this->entityType->isRevisionable()) { - $revision_name = $table_mapping->getDedicatedRevisionTableName($storage_definition, $deleted); - if ($this->database->schema()->tableExists($revision_name)) { - $this->database->schema()->dropTable($revision_name); + $revision_table_name = $table_mapping->getDedicatedRevisionTableName($storage_definition, $deleted); + if ($this->database->schema()->tableExists($revision_table_name)) { + $this->database->schema()->dropTable($revision_table_name); } } $this->deleteFieldSchemaData($storage_definition); diff --git a/core/modules/system/tests/modules/entity_test_revisionable_schema_converter/entity_test_revisionable_schema_converter.module b/core/modules/system/tests/modules/entity_test_revisionable_schema_converter/entity_test_revisionable_schema_converter.module deleted file mode 100644 index b02d933..0000000 --- a/core/modules/system/tests/modules/entity_test_revisionable_schema_converter/entity_test_revisionable_schema_converter.module +++ /dev/null @@ -1,6 +0,0 @@ -convertToRevisionable( $sandbox, 'entity_test_to_rev_conversion', - ['test_single_property', 'test_multiple_properties', 'test_single_property_multiple_values', 'test_multiple_properties_multiple_values']); + [ + 'test_single_property', + 'test_multiple_properties', + 'test_single_property_multiple_values', + 'test_multiple_properties_multiple_values', + ]); } /**