First off this module is great, and will replace tons of custom code. However, I am not seeing an example of how to do something I need to be able to do. If anyone can help me out and figure out if it is possible, I will create an example class(s) and submit it as a patch.
I have a database that contains 1000 people in it. Each person (row) has about 8 fields that I need migrated to Drupal. Doing that once, is easy, and I have that working.
However, if a field changes in that system, I need it to update the content in Drupal. To make this more complex, there are 5 fields in drupal on the content type that are not in source table. So I can't just rollback the migration and run it again.
If a new person is hired, it should create a new node for them of course.
Lastly, if a person leaves (and their row is deleted), I need it to unpublish the node on the drupal side.
Can this be done?
Comments
Comment #1
mikeryanWhen you say there are 5 fields in Drupal that are not in the source table, do you mean that they're being manually updated and you want to be sure re-importing the user doesn't blow away the manually-entered data? In that case, you need to look at http://drupal.org/node/1117454 - you would set your migration's system-of-record to DESTINATION, and leave those fields unmapped to preserve them.
There is no built-in mechanism for recognizing that previously-imported items have disappeared from the source (there's a feature request for this: #1416672: Optionally delete destination when source data is removed (with tests)), this is something that has to be done on an application-specific basis. You would need to define a "migration" derived from MigrationBase which compares the source table to the migration map table and takes the desired action when something in the map table is no longer in the source.
Comment #2
mikeryanNo further information provided.