prisma format
strips comments on block level attributes
#13471
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
topic: comments
topic: prisma format
CLI: prisma format
Milestone
Bug description
As it says on the tin: it seems like all block level attribute comments are stripped out when running
prisma format
Some tangential, but relevant context: I have the same problem as this issue and solved it by implementing this hack, which uses a specific comment
//nomigrate
to ignore certain lines (specifically a ts_vector GiST index) prior to runningprisma migrate dev
.However I realised that after running
prisma format
, the comment at my index was gone, causingprisma migrate dev
to always generate a migration for my index, and thus causing it to fail since the index was correctly already in the DB.Not sure if related to this #3658
How to reproduce
run
npx prisma format
Expected behavior
Block level attribute comments should not get stripped out on format
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: