Loading core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +10 −0 Original line number Diff line number Diff line Loading @@ -376,6 +376,16 @@ protected function fetchNextBatch() { $this->getIterator()->rewind(); } /** * {@inheritdoc} */ public function rewind(): void { $this->batch = 0; // Database queries have to be run again as they cannot be rewound. unset($this->iterator); parent::rewind(); } /** * @return \Drupal\Core\Database\Query\SelectInterface */ Loading core/modules/migrate/tests/modules/migrate_track_changes_test/migrations/track_changes_test.yml +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ label: Track changes test. source: plugin: track_changes_test track_changes: true batch_size: 1 destination: plugin: entity:taxonomy_term migration_tags: Loading core/modules/migrate/tests/src/Kernel/TrackChangesTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ public function testTrackChanges() { ->execute(); // Execute migration again. $this->executeMigration('track_changes_test'); $this->executeMigration($this->migration); // Check that the all the hashes except for 'Item 2'and 'Item 4' have // changed. Loading Loading
core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +10 −0 Original line number Diff line number Diff line Loading @@ -376,6 +376,16 @@ protected function fetchNextBatch() { $this->getIterator()->rewind(); } /** * {@inheritdoc} */ public function rewind(): void { $this->batch = 0; // Database queries have to be run again as they cannot be rewound. unset($this->iterator); parent::rewind(); } /** * @return \Drupal\Core\Database\Query\SelectInterface */ Loading
core/modules/migrate/tests/modules/migrate_track_changes_test/migrations/track_changes_test.yml +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ label: Track changes test. source: plugin: track_changes_test track_changes: true batch_size: 1 destination: plugin: entity:taxonomy_term migration_tags: Loading
core/modules/migrate/tests/src/Kernel/TrackChangesTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ public function testTrackChanges() { ->execute(); // Execute migration again. $this->executeMigration('track_changes_test'); $this->executeMigration($this->migration); // Check that the all the hashes except for 'Item 2'and 'Item 4' have // changed. Loading