Re: [Rails] heroku rake db:drop error PG::Error: FATAL: permission denied for database "postgres"

1,568 views
Skip to first unread message

Colin Law

unread,
Oct 6, 2012, 2:34:48 AM10/6/12
to rubyonra...@googlegroups.com
On 5 October 2012 21:41, mukul saharia <muku...@gmail.com> wrote:
> How to empty DB in heroku
> I have a Postgres database on Heroku. It is one of the free beta ones.
> Locally, when testing, I often run rake db:drop && rake db:create && rake
> db:migrate as a way to reset the database.
> However, when I try to run this on Heroku, I get the error:\[code\]Couldn't
> drop mydatabaseid :
> #<PG::Error: FATAL: permission denied for database "postgres" DETAIL: User
> does not have CONNECT privilege.
> \[/code\]Uh, ok, so how am I supposed to completely reset my database,
> migrations and everything?

Googe found this as the second hit
http://stackoverflow.com/questions/8162420/running-rake-dbdrop-dbcreate-dbmigrate-on-heroku-cedar-stack

I don't know what pg:reset does on heroku so this may not be relevant
but generally it is better to use rake:schema:load rather than create
followed by running all the migrations.


Colin

Raj Kiran Bhogaraju

unread,
Nov 7, 2013, 9:03:30 AM11/7/13
to rubyonra...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages