Migration Script Created With Foreign Key Fields in Wrong Order #5589
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
tech/engines/migration engine
Issue in the Migration Engine
Milestone
Bug description
I am trying out a schema with a model that has a foreign key relation containing three fields.
Running
migrate
against this schema results in a generatedmigration.sql
where there is an issue with the foreign key fields being in the wrong orderHow to reproduce
prisma migrate dev --preview-feature
The bug is a result of the following SQL that gets generated.
Notice that the foreign key fields are specified in the wrong order.
If I manually go in there and re-order the foreign key fields to this, it resolves the issue.
Expected behavior
Migrate should complete successfully.
Prisma information
Environment & setup
The text was updated successfully, but these errors were encountered: