Migrate both public and private files
I could not figure out a way to conditionally map content to public and private fields in one migration.

But, I did figure out how to resolve the issue.


I migrated all d6 files, public and private, to the d7 public attachments field.
I created a query that finds all the private files migrated into the public attachments field:

SELECT * FROM migrate_map_f43b6e55cfile mm inner joinfield_data_field_attachments fa on mm.destid1 = fa.field_attachments_fid inner join file_managed fm on fa.field_attachments_fid = fm.fid where fm.uri like '%private%' and fa.entity_type = 'node' order by fm.filename


The private files can be identified because they will have 'private' in their URI.


I iterate through the query results and switch the private files from the public attachments field to the private attachment field.


This process, while requiring an additional step after the actual migration, works perfectly.