Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Support a means of rerunning a migration process to update the migrated content in place, instead of clearing and re-importing.
See also #429306: Create content sets for updating existing content
Comments
Comment #1
mikeryanThe initial implementation of this feature will only be exposed via drush - see Migrate module workflow refactoring. I have this basically done for nodes, it needs more testing and application to other destination types, but I expect to commit it within a few days.
Comment #2
mikeryanCommitted. This feature is only available through Drush at this time (add a "--update" flag to the migrate import command).
Comment #3
pabloid CreditAttribution: pabloid commentedAm I wrong or it seems to have a strange behaviour?
I tried the --update option with drush but I noticed this:
- if the source content title changed, after the re-import on drupal the node title is update in node table, but not in node_revision table.
- update on body field seems to not working.
Anyway, thanks for the great work you're doing here.
Comment #4
mikeryanThanks for picking that up - when updating and not creating a new revision, the node object needs to have the vid present. I'll commit this fix within a day or two with #650472: Workflow refactoring, in the meantime you can modify the beginning of node_migrate_import_node() to look like this:
Comment #5
mikeryanCommitted as part of #650472: Workflow refactoring.