Forcing file migration after deleting field I have a situation where I am working on Drupal 6 to Drupal 7 migration.  The migration is being done in stages, and stage one is now live.

I am working on stage 2, and have run into a snag file file migrations.

We had a content type 'foo' with field 'field_bar'.  It was originally created as File, but should have been image.  We ran migrations, and everything went OK (all files were part of original migration).

'foo.field_bar' got deleted and recreated as Image.  When we re-run migrations, the files aren't being attached.

As far as I can tell, is that the source/destination pair exists in {migrate_map_files} but the fid doesn't exist in {file_managed}, more than likely because it got deleted during garbage collection when cron ran.

What is the best option to force these migrations to run again?  Is there a way to do this with the Migration classes, or should I delete the bad rows from {migrate_map_files}?
My current solution is to use a query, and manually cleanup the {migrate_map_files} table

$fids = db_query('
  SELECT mmf.sourceid1 FROM {migrate_map_files} mmf
  LEFT JOIN {file_managed} f ON f.fid = mmf.destid1
  WHERE f.fid IS NULL
')-&gt;fetchCol();

db_delete('migrate_map_files')
  -&gt;condition('sourceid1', $fids, 'IN')
  -&gt;execute();


reset the watermark in {migrate_status} and then re-run my files migrations.