a year ago
I used to be able to railway shell
then run node ace migration:status
and node ace migration:run
to run the migrations on my db.
I now get this error:
[ error ] getaddrinfo ENOTFOUND pgvector.railway.internal
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
I suspect this is because i was using public networking on my postgres db, but have switched that off in favour of private networking between my api and my db.
To provide some more context, this is an Adonis JS 6 API that i'm trying to run migrations with.
I have no idea what to do tbh.
6 Replies
a year ago
yep, that would explain. railway shell
doesn't connect you to our network but only creates a shell with the env from your selected service.
Your options here would be to change the way you run migrations and specify the remote (public) database url locally, or make it so migrations run in your start
command, before bringing the service up, which is a fairly common practice.
Status changed to Awaiting User Response Railway • 11 months ago
a year ago
Brilliant. I've updated my Dockerfile CMD ["sh", "-c", "node ace migration:run --force && node ./bin/server.js"]
and that's done the trick!
Status changed to Awaiting Railway Response Railway • 11 months ago
a year ago
Hey whilst i have you, i used to be able to see a "table" option on my postgres db which would allow me to visually see the data etc.
I believe that's gone because i migrated to a pgvector service template - so i'm guessing that's not supported?
How can i gain access to my pgvector db otherwise? I wasn't aware of the public networking egress charges so i got stung by that, and since then turned it off as I mentioned earlier.
a year ago
yep that would be why, we only support the viewer on the 1click databases you can create from the canvas (afaik).
You should still be able to access your db using the DATABASE_URL
coming out of the pgvector service. you can use it with any database viewer
Status changed to Awaiting User Response Railway • 11 months ago
a year ago
Hi - i still can't access it via DATABASE_URL.
I definitely have public networking on (see screenshot).
And here's my connection string (with the pw): postgres://postgres:{PASSWORD}@junction.proxy.rlwy.net:57236/railway
I get an error when trying to connect (see second screenshot)
Attachments
Status changed to Awaiting Railway Response Railway • 11 months ago
a year ago
This seems to be an issue specific to your database's setup. Did you change any configurations, and could you try redeploying it?
Status changed to Awaiting User Response Railway • 11 months ago