P
Prismaโ€ข5mo ago
Matt Hamann

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.
No description
4 Replies
Matt Hamann
Matt HamannOPโ€ข5mo ago
here's the diff of the prisma schema that made this db change
No description
RaphaelEtim
RaphaelEtimโ€ข5mo ago
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/prisma
Bug 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...
Matt Hamann
Matt HamannOPโ€ข5mo ago
thanks. i was looking for an issue but must not have typed in the right thing ๐Ÿ˜‚
RaphaelEtim
RaphaelEtimโ€ข5mo ago
No worries.
Want results from more Discord servers?
Add your server