Hi, we are setting up Prisma to use in Production....
# orm-help
a
Hi, we are setting up Prisma to use in Production. In our dev we are preforming migrate dev --name init and when we deploy to prod in our start script in Node.js we have the prisma migrate deploy. But we are getting this error without any error logs: 3 migrations found in prisma/migrations Error: P3009 migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve [2022-04-18 125506] The
20220413095619_init
migration started at 2022-04-18 095258.950 UTC failed with the following logs: Does anyone has experience with this?
y
Sounds like your db had migrations applied to it which clash with the ones prisma created
did you try to wipe your db?
a
No I did not
You belive that`s the issue
How can I then make sure the prod db in fitire don`t need to get reset?
j
Did the documentation link in the error message not help?
Can you share a screenshot of the full error message you are getting? Usually there should be something after "following logs".
The error you are getting indicates that the internal Prisma Migrations table has a record of a failed migration on that database already. To protect you from making it worse, Prisma is basically throwing up its arms and saying: You need to fix that first. The link that is output should have all the information how to.