P
Prisma2mo ago
256-8

Accidental deletion of a migration file

I have two problems: 1. Due to poor attention to detail, an applied migration file from 6 months ago was deleted (both folder and migration.sql) in a branch that was merged into main 2. In the same branch new enums were added to schema.prisma BUT prisma migrate dev was NOT run After this in the heat of the moment, I added the deleted branch back into main (no prisma commands were ran, simply added the file back to production). running
pnpm prisma migrate status
pnpm prisma migrate status
on main returns that everything is up to date BUT
pnpm prisma migrate dev
pnpm prisma migrate dev
leads to some old changes being displayed, that do not reflect the current state of prisma.schema. I would like to know the best way to proceed to revert the situation?
3 Replies
Prisma AI Help
Prisma AI Help2mo ago
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!
256-8
256-8OP2mo ago
@Nurul (Prisma) Could you possibly help me? 🙏
Nurul
Nurul2mo ago
Hey 👋 If I understand correctly, when you are running migrate dev now, you are getting a drift? What changes are being displayed?

Did you find this page helpful?