Column order changing
We're using Prisma ORM with PlanetScale and we've noticed that Prisma will "randomly" change the order of the columns when we push schema updates. (See attached for an example)
This is happening even though we haven't modified the schema model order. In this case, we added a unique index on a completely different model/table, and yet a different table has been "modified" to change the column order.
Are we doing something wrong? If not, I can open an issue for further investigation.
4 Replies
here's the diff of the prisma schema that made this db change
Hi @Matt Hamann ๐
This is a known issue and we do have an open issue for this. You can add for usecase tot he issue and upvote it by leaving a ๐ to help our engineers prioritize it.
GitHub
db push
should keep column order ยท Issue #4780 ยท prisma/prismaBug description When running prisma db push to locally update a DB schema, the changed columns are added at the end of the table. How to reproduce Steps to reproduce the behavior: Have a DB with sc...
thanks. i was looking for an issue but must not have typed in the right thing ๐
No worries.