X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2FSqlBase.php;h=4bf846e854eb0dd250be2d5eb6c8a3141736c5f7;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=b9e8e731ab6bdc123e14ba6b0a0a7e8f9ce5e2e4;hpb=9424afc6c1f518c301bf87a23c047d1873435d05;p=yaffs-website diff --git a/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php index b9e8e731a..4bf846e85 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -108,6 +108,11 @@ abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPlugi public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration); $this->state = $state; + // If we are using high water, but haven't yet set a high water mark, skip + // joining the map table, as we want to get all available records. + if ($this->getHighWaterProperty() && $this->getHighWater() === NULL) { + $this->configuration['ignore_map'] = TRUE; + } } /** @@ -322,7 +327,9 @@ abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPlugi if ($this->getHighWaterProperty()) { $high_water_field = $this->getHighWaterField(); $high_water = $this->getHighWater(); - if ($high_water) { + // We check against NULL because 0 is an acceptable value for the high + // water mark. + if ($high_water !== NULL) { $conditions->condition($high_water_field, $high_water, '>'); $condition_added = TRUE; }