Prisma migrate problem

berkanbasaran05PRO

a year ago

the issue is like that; when i start project normally. it works and it connect database . there is no problem. but when i try with custom start command so its like that ; "npx prisma migrate deploy && npm start", it give bug which say it cant connect data base. how can i solve this problem. i have to migrate my prisma changes.. please help me

5 Replies

a year ago

Please share the error you are getting.


berkanbasaran05PRO

a year ago

Datasource "db": PostgreSQL database "railway", schema "public" at "viaduct.proxy.rlwy.net:38891"

Error: P1001: Can't reach database server at viaduct.proxy.rlwy.net:38891


berkanbasaran05PRO

a year ago

i have to solve this problem otherwise i will cancel my pro account. btw i have another quesiton. can i connect my server on terminal on my computer? like ssh root@1……


isaac-hinmanPRO

6 months ago

Did you resolve this problem? I have seen similar errors and have not been able to set up a prisma migrate step in my Railway deploy.


isaac-hinmanPRO

6 months ago

FYI I was finally able to resolve this.

For context, I am referring to a custom start command for my service.

What DID NOT work:

npm run prisma migrate deploy && npm start

The container died after prisma migrate deploy exited successfully

What DID work:

/bin/sh -c "npm run prisma migrate deploy && npm start"

Seems like a Railway footgun, but there you have it.


Prisma migrate problem - Railway Help Station