heroku connect to postgres .env code example
Example 1: connect to db heroku
heroku pg:psql -f schema.sql -a HEROKU_APP_NAME
Example 2: link db to heroku
DATABASE_URL=postgresql://name:pass@localhost:5432/db name
heroku pg:psql -f schema.sql -a HEROKU_APP_NAME
DATABASE_URL=postgresql://name:pass@localhost:5432/db name