MigrateDestinationNodeRevision

Last updated on
30 April 2025

To migrate content into Drupal node revisions, use the MigrateDestinationNodeRevision class (assuming you've already migrated the nodes previously using the MigrateDestinationNode class):

$this->destination = new MigrateDestinationNodeRevision('article');
$this->addFieldMapping('title', 'source_title');
$this->addFieldMapping('body', 'source_body');
...

The first argument is the bundle (content type) you wish to migrate source content revisions into.

Fields

vid - The Drupal revision ID. Usually this will be unmapped - the vid will be automatically assigned when the node revision is created, and the map table will record the source key that generated this ID. You will need to map the vid when the system-of-record is DESTINATION (i.e., the purpose of your migration is updating existing nodes rather than importing new nodes). Also, if you want to maintain the same revision ID as you had in the source system, you would map that ID to the vid (note: beware of potential ID conflicts!).

(All MigrateDestinationNode fields are inherited, in addition to the field above).

Help improve this page

Page status: Not set

You can: