Is it possible for the migrate deploy command to a...
# prisma-migrate
t
Is it possible for the migrate deploy command to actual return the error when fails to migrate? Now we need to go into the db and look at the prisma_migrations table
j
Hi! Could you tell me more about your case here? For example if using this bash code
Copy code
#!/bin/bash

export DATABASE_URL="<postgres://prisma:prisma@localhost:5432/playground5>"

$(npx prisma migrate deploy > /dev/null 2>&1); echo $?
It will return 1 (exit code = error) for example for
Copy code
1 migration 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>
The `20220408121721_first` migration started at 2022-04-14 08:25:43.542266 UTC failed with the following logs:
The best would be to file a bug issue here with the information needed for a reproduction
t
It would be nice if prisma migrate could return the actual database error that we can see in the prisma migrations table. I guess that you are doing some aggregated matching between Prisma errorcodes and database error codes.