Need help integrating postgresql database (hosted on railway) with Auth0

Hi, I’m using Auth0 for authenticating users in my app, now I’m trying to implement custom database for my app. So my database is hosted on and I added the connection url to custom database integration scripts, I’m a bit confused about few things:

  1. I’m not able to connect properly and I’m getting "[Error] ECONNREFUSED - connect ECONNREFUSED"
  2. I don’t exactly know what my user table’s schema should be, so i want to know what columns do i need to have.
  3. Can I add extra custom columns to my user’s table other than what auth0 is going to fill in? suppose i need a posts[] row in the users table, can I add it?

i got the same error, i tried to run psql , and it’s working