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.
The map classes will track last-imported times on a per-row basis if you set trackLastImported, but there's no method to do so. Add a setter, or perhaps an options argument to the constructor...
Comment | File | Size | Author |
---|
Comments
Comment #1
mikeryanDone.
Comment #3
svilleintel CreditAttribution: svilleintel commentedI know there is the ability to now set the option in the constructor, but can a getter and setter please be added aswell. I have a use for it.
Comment #4
tea.time CreditAttribution: tea.time commentedEchoing #3 --
I ran into the case of using migrate_d2d, which happens to handle constructing the MigrateSQLMap object without giving the calling code any way to pass
$options['track_last_imported']
to the constructor.I realize another solution could be patching migrate_d2d to add in that option, but patching Migrate to add a getter and setter seems more flexible -- unless there is some reason why allowing that setting to be changed could be problematic? The only potential issue I could see would be changing that value would lead to creating inconsistent data (i.e. some rows would have the timestamp, and others wouldn't)...but I think that could happen already by changing that option passed into the constructor?
Anyhow, if this makes sense, patch is attached.
Comment #5
mikeryanPlease don't tack on to a long-closed issue, open a fresh issue.
Restoring the original issue's state.
Comment #6
tea.time CreditAttribution: tea.time commentedAh, sorry. I was aiming not to duplicate issues. I've moved my request to #2353527: Add getter and setter methods for trackLastImported.