-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Mutliple 1-n self relations break migrations #3805
Copy link
Copy link
Closed
prisma/prisma-engines
#1294Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/enginesIssue for tech Engines.Issue for tech Engines.tech/engines/datamodelIssue about parsing/validation/rendering of the Prisma schemaIssue about parsing/validation/rendering of the Prisma schematopic: implicit m:nimplicit many-to-many relationsimplicit many-to-many relationstopic: schema
Milestone
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/enginesIssue for tech Engines.Issue for tech Engines.tech/engines/datamodelIssue about parsing/validation/rendering of the Prisma schemaIssue about parsing/validation/rendering of the Prisma schematopic: implicit m:nimplicit many-to-many relationsimplicit many-to-many relationstopic: schema
Bug description
I cannot successfully run
prisma migrate up --experimantalwhen using multiple 1-n self relations with following error:How to reproduce
Based on the example provided in Prisma self-relation docs I have following schema which results in above error when running as single migration:
However, when I run migrations as consecutive migrations it works:
Expected behavior
Pass migration with single migration of complete schema!
Environment & setup