You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
terion-name
changed the title
Self-relation column order
Self-relation column order?
Jun 29, 2021
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?The text was updated successfully, but these errors were encountered: