Validation issue for schemas with compound foreign keys #2387
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
tech/engines
Issue for tech Engines.
topic: schema
Milestone
Bug description
The following schema is invalid:
because:
fields
in the@relation
of modelGame
has two values, soreferences
must have two values as wellreferences
to have two values, theUser
model must have a unique contraint on two fields.The correct schema should be:
How to reproduce
Type the above schema into a VSCode window.
Expected behavior
Red squiggly lines in the VSCode extension, and a validation error when generating Prisma Client or running Migrate commands
Prisma information
prisma: 2.0.0-alpha.1187
Environment & setup
Irrelevant
The text was updated successfully, but these errors were encountered: