Problem/Motivation
I have a Drupal 7 site that receives regular imports of content from an XML feed. The XML feed is processed by a custom module leveraging Migrate. A few thousand nodes and entities of different types are created based on the feed.
The content creators who use the site primarily update a database that generates the XML feed, and this updates the Drupal site. However, there are some cases where individual fields in a content type are not tracked in the XML feed, and these should be managed in Drupal.
As an example, say the feed has "Title", "Body" and "Date" fields, and these are tracked by the Migrate code and mapped to fields in the Page content type. Suppose I add a "Video" field to the Page content type, edit a node, and add a link to a Video in that field. Now I run my migration with the `--update` flag, and the node is updated with the latest values from the XML feed, but Video is wiped out.
Now, I could specify `$this->systemOfRecord = Migration::DESTINATION;` and run the migration; this would preserve the contents of the Video field.
However, running migrate-import with systemOfRecord set to DESTINATION means that I don't get any new content added to the site. It will only update existing nodes, not create any new ones.
I need the ability to both update existing content, import new content, and ignore fields that are not tracked by the migrate code. Basically, a hybrid of `--update` and `systemOfRecord = Migration::DESTINATION`.
Does anyone have any ideas? Thanks in advance.
Proposed resolution
None at the moment.
Remaining tasks
None at the moment.
User interface changes
None at the moment.
API changes
None at the moment.
Comments
Comment #1
kostajh commentedActually, I think this may be covered by #1461398: Looking for Option to change systemOfRecord during Migration .
Comment #2
mikeryanAnswered in #1461398: Looking for Option to change systemOfRecord during Migration .