You are here

public function MigrateSQLMap::prepareUpdate in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 plugins/sources/sqlmap.inc \MigrateSQLMap::prepareUpdate()

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.

Overrides MigrateMap::prepareUpdate

File

plugins/sources/sqlmap.inc, line 497
Defines a Drupal db-based implementation of MigrateMap.

Class

MigrateSQLMap
@file Defines a Drupal db-based implementation of MigrateMap.

Code

public function prepareUpdate() {
  $this->connection
    ->update($this->mapTable)
    ->fields(array(
    'needs_update' => MigrateMap::STATUS_NEEDS_UPDATE,
  ))
    ->execute();
}