diff --git a/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php b/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php index 7fda795..ee7c77a 100644 --- a/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php +++ b/core/lib/Drupal/Core/Entity/Sql/RevisionableSchemaConverter.php @@ -24,7 +24,7 @@ class RevisionableSchemaConverter { protected $entityTypeManager; /** - * The last installed schemea repository service. + * The last installed schema repository service. * * @var \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface */ @@ -70,10 +70,10 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent * - rename the existing entity tables to temporary names; * - create the schema from scratch with the new revisionable entity type * definition (i.e. the current definition of the entity type from code); - * - load the old data by using the original last install entity definition - * and a temporary table mapping class, which knows how to access the - * temporary tables created in the first step; - * - save the data using the current revisionable entity type definition + * - load the old data by using the original last installed entity + * definition and a temporary table mapping class, which knows how to + * access the temporary tables created in the first step; + * - save the data using the current revisionable entity type definition; * - at the end of the process, remove the temporary tables. * * @param array $sandbox @@ -175,7 +175,8 @@ protected function copyData(array &$sandbox) { $entity_ids = $this->database->select($temporary_base_table) ->fields($temporary_base_table, [$id]) ->condition($id, $sandbox['current_id'], '>') - ->range(0, 10) + ->orderBy($id, 'ASC') + ->range(0, 100) ->execute() ->fetchAllKeyed(0, 0); diff --git a/core/tests/Drupal/Tests/Core/Entity/RevisionableSchemaConverterTest.php b/core/tests/Drupal/Tests/Core/Entity/RevisionableSchemaConverterTest.php index 55acd15..9d32fc2 100644 --- a/core/tests/Drupal/Tests/Core/Entity/RevisionableSchemaConverterTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/RevisionableSchemaConverterTest.php @@ -128,7 +128,7 @@ public function testMakeRevisionable() { * marked as translatable through Content Translation settings. */ public static function createTestEntities() { - // Create 101 items so the batch upgrade runs at least three times. + // Create 101 items so the batch upgrade runs at least two times. for ($i = 1; $i <= 101; $i++) { $entity = EntityTestToRevConversion::create([ 'name' => $i,