Cannot run prisma migration in production database hosted in fly

I am trying to migrate my local postgres db in production and I cannot connect to the postgres db hosted in fly.io. I could do this with other databases though.

I think, I went through the process of setting up the db. I saved and used the exact connection string that was provided during the setup.

Getting this error:
Please make sure your database server is running at nepalist-db.internal:5432.

Connection string looks like this:
postgres://postgres:password@nepalist-db.internal:5432/nepalist

Also tried the url like this that was generated after detaching and reattaching the db:

DATABASE_URL=postgres://nepalist:password@top2.nearest.of.nepalist-db.internal:5432/nepalist?sslmode=disable

Hello! check Connect With flyctl · Fly Docs, the simplest for one-off tasks like this is to run fly proxy 5432 and connect as it was running locally.

1 Like

I guess. Thats it. Thanks!!