P3005 Error running Prisma migrate
I am working on a NextJS project that uses prisma. I was able to define my initial schemas and deploy my initial migrations successfully. I made a small change in the diff screenshot attached to this message and I am able to run
npx run db push
with no issues. When I try to run npx prisma migrate dev
to generate a migration, I get the following error:
I understand I can follow the docs to basically reset my migration history, but I would rather understand how to do this properly, because I would imagine I shouldn't be starting from scratch every time I make a scehma change?
Any ideas what I did wrong?
1 Reply
Update: I ran the suggested commands on the baselining docs and while this worked I lost all the data in my db. This is not a huge deal because it was just test data while I learn Prisma, but how can I ensure this doesn't happen again as my project scales?
Also, following the steps in the docs didnt regenerate a new
migration_lock.toml
file. This is also an issue, correct?