I am working with mongoengine and trying to do a simple migration. I have a field which I would like to migrate from being a StringField to a ReferenceField to another Object.
The 2 options I would suggest for your migration script:
using DynamicField on the field you must migrate should allow you to read ObjectIds and store back DBRefs
doing the migration in pymongo directly (pymongo's collection is accessible through Person._get_collection()) and looping over the items, updating & saving