Running rake db:drop db:create db:migrate on Heroku Cedar stack

John picture John · Nov 17, 2011 · Viewed 21.6k times · Source

When I try to run:

heroku run rake db:drop db:create db:migrate

I get the error:

Running rake db:drop attached to terminal... up, run.5
Couldn't drop adsfsadfas : #<ActiveRecord::StatementInvalid: PGError: ERROR:  must be owner of database adsfsadfas
: DROP DATABASE IF EXISTS "adsfsadfas">

I am on the Heroku Cedar stack. Am I allowed to drop databases on Heroku?

Thanks!

John

Answer

Francisco Soto picture Francisco Soto · Nov 17, 2011

The rake db:reset task is not supported. Heroku apps do not have permission to drop and create databases. Use the heroku pg:reset command instead.