- πΊπΈUnited States joshuasosa
I have a Drupal 9 install post Drupal 7 migration where files exist in the Files area but not in the Media area. The new site is in a good state, and I'm not sure if other Drupal 7 to 9 migrations would create duplicates or conflict with what's already in the Drupal 9 site's Files area. I also don't know if media_migration actually has anything yet for files that exist in a Drupal 9 Files area but not in Media. All I saw was stuff for Drupal 7, including patch 72 here, which is not what I needed. I basically don't care about Drupal 7 and just want Drupal 9 Files converted to Drupal 9 Media.
For anyone else needing to migrate/convert Drupal 8/9/10 Files to Media:
The patch from #38 is exactly what I needed. After patching, I copied file_media.yml to my own module'sconfig/install/migrate_plus.migration.file_media.yml
like #36 mentions and changed the definition forfile
todocument
like Drupal 9/10 has. The only other change needed was to changeUnicode::strtolower
tomb_strtolower
incore/modules/media/src/Plugin/migrate/source/File.php
. I ran drush mim file_media and it successfully added Media entries.