2 months ago
I can't get my prisma db to connect at all no matter what I try.
I've tried using prisma configs, different schemas, different dbs, everything crashes all the time. i need help
6 Replies
2 months ago
Hey!
This seems like an issue with your project/application. Unfortunately, we're unable to offer first-party support for issues unrelated to the Railway product or platform.
That being said, the community might be able to help debug that!
Status changed to Awaiting User Response Railway • 2 months ago
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 2 months ago
2 months ago
Hey, how are you defining the connection parameters? Are you using your DB public url?
2 months ago
hey! here's the connection im using:
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
},
datasource: {
url: env("DIRECT_DATABASE_URL"),
},
});2 months ago
This is going to maybe be a stupid answer, however, are you sure that your env is DIRECT_DATABASE_URL as railway normally uses DATABASE_URL
2 months ago
Funnily enough I just figured out the issue was that my prisma migrate wasnt running correctly on deploy, it dos use direct database url as i have some stuff in my docker due to some earlier issues but I figured it out. Thanks though y'all!
2 months ago
Glad to know you figured it out and thanks for sharing that it was the prisma migrate not running correctly on deploy for future readers!
Happy Building 🚂
Status changed to Awaiting User Response Railway • 2 months ago
Status changed to Solved chandrika • 2 months ago