I need to assess the database schema of the Postgres instance running on Heroku. Without luck, I have tried the following methods:
heroku run -a my_app_name 'pg_dump -s DATABASE_URL' > output.sql
where DATABASE_URL would be the whole string out of
heroku config:get DATABASE_URL -a my_app_name
This is the closest I could get, as the command runs but the output is left empty. For this I added the flag -s for pg_dump to only get the schema and no data.
I have also tried following this answer but couldn't use it to get the schema.