You are here

public function Sql::prepareUpdate in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::prepareUpdate()

Prepares to run a full update.

Prepares this migration to run as an update - that is, in addition to unmigrated content (source records not in the map table) being imported, previously-migrated content will also be updated in place by marking all previously-imported content as ready to be re-imported.

Overrides MigrateIdMapInterface::prepareUpdate

File

core/modules/migrate/src/Plugin/migrate/id_map/Sql.php, line 742

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

public function prepareUpdate() {
  $this
    ->getDatabase()
    ->update($this
    ->mapTableName())
    ->fields([
    'source_row_status' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
  ])
    ->execute();
}