Heroku PostgreSQL Heroku PostgreSQL heroku heroku

Heroku PostgreSQL


To the best of my knowledge, Heroku does not offer direct access to the database. Does heroku console cut it for you? You can access the db through your models directly.

Otherwise you may want to look at how to import/export your database.


If you have access to a dedicated database, you will be able to take advantage of the "ingress" feature to get a raw connection to your database, compatible with all programs that need to speak over the Postgres wire protocol (examples include: psql, pgadmin, navicat, or Microsoft Excel with ODBC -- yes, really, and it's not half bad sometimes!)

But on shared databases you are somewhat out of luck at this time unless you somehow bounce your interactions off ruby and the pg gem.


Alternatively (if you're able to) use db:pull to bring the database locally, do the work locally and then db:push it back up.

Or more likely the easiest option is to do it from console (heroku console at prompt)

John.