reverted: --- b/core/modules/migrate/config/schema/migrate.schema.yml +++ a/core/modules/migrate/config/schema/migrate.schema.yml @@ -19,8 +19,6 @@ load: type: migrate.load.[plugin] label: 'Source' - highWaterProperty: - type: mapping source: type: migrate.source.[plugin] label: 'Source' diff -u b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php --- b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -114,7 +114,6 @@ */ protected function initializeIterator() { $this->prepareQuery(); - $high_water_property = $this->migration->get('highWaterProperty'); // Get the key values, for potential use in joining to the map table, or // enforcing idlist. @@ -173,16 +172,19 @@ } // 3. If we are using high water marks, also include rows above the mark. // But, include all rows if the high water mark is not set. - if (isset($high_water_property['name']) && ($high_water = $this->migration->getHighWater()) !== '') { - if (isset($high_water_property['alias'])) { - $high_water_field = $high_water_property['alias'] . '.' . $high_water_property['name']; + if (isset($this->configuration['high_water_property'])) { + $high_water_property = $this->configuration['high_water_property']; + if (isset($high_water_property['name']) && ($high_water = $this->migration->getHighWater()) !== '') { + if (isset($high_water_property['alias'])) { + $high_water_field = $high_water_property['alias'] . '.' . $high_water_property['name']; + } + else { + $high_water_field = $high_water_property['name']; + } + $conditions->condition($high_water_field, $high_water, '>'); + $this->query->orderBy($high_water_field); + $condition_added = TRUE; } - else { - $high_water_field = $high_water_property['name']; - } - $conditions->condition($high_water_field, $high_water, '>'); - $this->query->orderBy($high_water_field); - $condition_added = TRUE; } if ($condition_added) { $this->query->condition($conditions); only in patch2: unchanged: --- a/core/modules/migrate/config/schema/migrate.data_types.schema.yml +++ b/core/modules/migrate/config/schema/migrate.data_types.schema.yml @@ -27,6 +27,16 @@ migrate_source_sql: target: type: string label: 'The migration database target' + high_water_property: + type: mapping + label: 'High-water property' + mapping: + name: + type: string + label: Name + alias: + type: string + label: 'Table alias' migrate_load: type: migrate_plugin only in patch2: unchanged: --- a/core/modules/migrate_drupal/tests/src/Unit/source/VariableMultiRowSourceWithHighwaterTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/VariableMultiRowSourceWithHighwaterTest.php @@ -18,7 +18,7 @@ class VariableMultiRowSourceWithHighwaterTest extends VariableMultiRowTestBase { * {@inheritdoc} */ protected function setUp() { - $this->migrationConfiguration['highWaterProperty']['field'] = 'test'; + $this->migrationConfiguration['source']['high_water_property']['name'] = 'test'; parent::setup(); } only in patch2: unchanged: --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/CommentSourceWithHighWaterTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/CommentSourceWithHighWaterTest.php @@ -20,7 +20,7 @@ class CommentSourceWithHighWaterTest extends CommentTestBase { * {@inheritdoc} */ protected function setUp() { - $this->migrationConfiguration['highWaterProperty']['field'] = 'timestamp'; + $this->migrationConfiguration['source']['high_water_property']['name'] = 'timestamp'; array_shift($this->expectedResults); parent::setUp(); }