Friday, June 8, 2012

Switch database from MySQL (ClearDB addon) back to PostgresSQL in Heroku

Had permission problems using ClearDB and figure it wasn't worth all the hassle of adding another layer of abstraction/configuration when Heroku already works with PostgreSQL out of the box. Here's how to switch back to PG.

# Remove addon
heroku addons:remove cleardb

# Set DATABASE_URL back to PG
heroku config | grep SHARED_DATABASE_URL # => postgres://XXX
heroku config:add DATABASE_URL='postgres://XXX'

No comments: