Prisma complains when enum types are not declared in alphabetical order #16225
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.
topic: enum
"type"/block `enum`
topic: migrate
topic: prisma migrate diff
CLI: prisma migrate diff
Milestone
Bug description
No changes have been made to the DB other than in the migrations present that match, but if I do
migrate dev
to make a new migration it wants to drop and re-add 3 of the columns that are linked to enums, though the new settings match what the migrations have (and on a fresh deployment this happens).After some digging, it seems to complain differently just based on moving the
enum
declarations around within the file, and putting them in alphabetical order in the schema file solves the issue of prisma thinking there is a difference.That's a VERY strange issue for sure.
How to reproduce
See provided schema, push that to a db.
Do prisma migrate diff
change order of enums
do prisma migrate diff
Expected behavior
That the order of the enums doesn't matter
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: