heroku connect database code example
Example 1: connect to db heroku
heroku pg:psql -f schema.sql -a HEROKU_APP_NAME
Example 2: how to find my postgres hostname heorku
heroku pg:credentials:url
Example 3: link db to heroku
DATABASE_URL=postgresql://name:pass@localhost:5432/db name