I am currently migratiing from prisma1 to prisma2 and there is question in scope of data migrating.
If we have a self-relation (a parent-children tree for example or a many-to-many graph), I can't determine what side what in relation table will be? I can obviously check it for certain cases by data, but I need a rule to make a migration script for multiple projects.
E.g.
type Unit {
id: ID! @id
managedBy: Unit @relation(name: "Manage" link: TABLE)
manages: [Unit!]! @relation(name: "Manage")
}
In this case managedBy is in A column and manages in B, but why? Because of parent-child relation? If yes then what it would by in M2M? Or because of field names and alphabetical ordering?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
I am currently migratiing from prisma1 to prisma2 and there is question in scope of data migrating.
If we have a self-relation (a parent-children tree for example or a many-to-many graph), I can't determine what side what in relation table will be? I can obviously check it for certain cases by data, but I need a rule to make a migration script for multiple projects.
E.g.
In this case
managedBy
is in A column andmanages
in B, but why? Because of parent-child relation? If yes then what it would by in M2M? Or because of field names and alphabetical ordering?