Forum: Ruby on Rails heroku rake db:drop error PG::Error: FATAL: permission denied for database "postgres"

796aaa9bf7a33f30c0288d84e94f0655?d=identicon&s=25 mukul saharia (Guest)
on 2012-10-06 02:30
(Received via mailing list)
How to empty DB in
heroku<http://stackoverflow.com/questions/4820549/how-to-...

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?
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2012-10-06 08:36
(Received via mailing list)
On 5 October 2012 21:41, mukul saharia <mukul85in@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...

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
90445d0150c04451721620060fec326e?d=identicon&s=25 Raj Kiran Bhogaraju (rajkiran55)
on 2013-11-07 15:03
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.