0

I have an ongoing migrate_d2d migration where I will need to be able to detect changes on a node by node basis, and I would really like to be able to use the functionality in the Hash source rows to detect changes feature to do that. However, I can't find where to add that option so that the hashes are generated. I've tried this is my class (that overrides DrupalNode6Migration):

$this->sourceOptions['track_changes'] = TRUE;

but the option isn't added and used. According to this referenced post on this feature, I should add it in my source constructor, but that part is handled by migrate_d2d in the abstract DrupalMigration class. Do I need to go down to that level to create my class just to access this property, or is there a way I can add it from my class that overrides Drupal6NodeMigration?

0

It seems you want to synchronize sites. http://timonweb.com/using-hash-value-trackchanges-to-detect-source-data-changes-in-migrate-for-drupal-7 If you follow on this example you have mentioned above, Filter nodes by the update time these are changed after you deployed at last. You use MigrateSourceSQL. So you able modify a query.

If you want to synchronize sites, use the module: services or feeds.

  • No, I don't want to synchronize sites; I just want to regularly import a specific node type from one site to other. I'm very familiar with feeds, as I've been using Feeds for the same thing on another site. In this case I was having issues with Feeds, so I wanted to try Migrate, as I've also used Migrate in the past for continuous migration of content, not just the initial migration. – wonder95 Aug 31 '14 at 21:54
  • So while migration process save the date of your last migration for an example into the system variable ym_last_migrtion_date. At the next migration you modify the SQL source query. Add filter by date. – viktor.likin Sep 1 '14 at 10:23
  • But why go through all that work when I can use the hash that Migrate already creates? – wonder95 Sep 3 '14 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.