Hi everyone :slightly_smiling_face: I'm running po...
# orm-help
e
Hi everyone 🙂 I'm running postgress app on a mac and I'm trying to do a migration I get this error when I run:
npx prisma migrate dev --schema=./prisma/schema.prisma
showing that it tries to connect to an older DB: ✔️ Drift detected: Your database schema is not in sync with your migration history. We need to reset the PostgreSQL database "next-auth-test" at "localhost:5432". Do you want to continue? All data will be lost. How do I fix this?
y
It means your DB schema and schema.prisma are out of sync. For example, if you change the name field to name2 using DDL, prisma won’t notice it. If you migrate in this state, it will appear that synchronization has failed.
e
Thank you for your reply. My thought is that there is another DB running from a previous project and that DB, of course, does not match the new schema. I don't know how to switch to a new DB that I set up.