kurtlibby
CCConvex Community
•Created by kurtlibby on 9/14/2024 in #support-community
Migrating a DB and Relationships
I'm looking at the import options and seeing that we can't include
_id
in the objects unless we have a Snapshot.
See here: https://docs.convex.dev/database/import-export/import#features
I'm totally fine with Convex creating new _id
s, but I don't understand how relationships can be maintained when migrating from another service where I don't have the Snapshot.
Since I'm migrating from MongoDB and I've got production data, it's unclear how to maintain those relationships. For instance, if a user has a list of tasks, the Task object has a user property with the _id of the user OR the User object has an array called tasks that has the _id for all of the users tasks. Either way, it is unclear how to preserve those relationships on import.
Anyone know how to do this or a good resource for understanding the process?8 replies