Hey folks, I've not touched my database for a coup...
# orm-help
d
Hey folks, I've not touched my database for a couple of months and I've now made some changes to my prisma schema. When I run
prisma migrate dev
I get the "migration was modified after it was applied" for my two most recent ones. No changes have been made to either of the migrations and I'd really like to avoid needing to store and reseed all my current data into prisma. Any ideas why this occurs, what could happen, and how to solve?
r
David 👋 Have you update Prisma?
j
that means that the file is not exactly the same as it was applied, it’s just a warning though and if nothing changed from your point of view then it could be a line ending or whitespace. Note that in a previous version of Prisma this warning could happen if you were on Windows for example and is now fixed
d
Yeah so I saw that GH issue and I reran
pnpm i -D prisma
Didn't fix anything, I assumed it's not with the client which is autogen anyways. @Joël you mentioned that it's a warning... How do I ignore it and proceed with the migration without performing a wipe?
j
So indeed
migrate dev
will need a reset, though it should only be used in development where it’s actually possible to reset When you want to apply to production run
migrate deploy
which will only apply unapplied migrations and warn you if they changed
d
So if I just generate the migrations and deploy them, it'll override that warning?