I'm trying to migrate a database from
I'm trying to migrate a database from MongoDB to Convex, and I'm having some issues. Is there any way to use my MongoDB Object Ids as the ids for Convex? I tried exporting all the collections from Mongo, parsing them for Convex using a python script, then importing them into Convex. I'm getting an
invalid _id '66f6f684f63d8eba16ffbed8'
error. I'm assuming using Object Ids from Mongo isn't possible in Convex, but I thought I'd check before I try to find a work around3 Replies
Yeah Convex creates it's own ids, no way around that. You could:
1. put the mongo id in a different field
2. migrate all tables over
3. update any relationships to use the new convex
_id
4. delete the old mongo idsThe migrations component can help with steps 3 and 4: https://www.convex.dev/components/migrations
Thanks, I'll look into that 👍