Search code examples
ruby-on-railsruby-on-rails-3herokuheroku-postgres

Resetting database on heroku


Now I am trying to reset database on heroku but got stuck.

I know I should do "heroku pg:reset Database URL but I don't know exactly what the databese url is.

I did "heroku config". So I got some strings. And tried

heroku pg:reset postgres://ffsqtmlnxntfvl:ajqGTMGEmT7U1S6sVdi7-bb7Cm@ec2-107-20-245-109.compute-1.amazonaws.com:5432/dc2kahsue8hn20. Valid options are: DATABASE_URL, HEROKU_POSTGRESQL_AQUA_URL

My command,however,always returns this to me.

Unknown database: postgres://xxxxxxxxx:[email protected]:xxxx/xxxxxxxxxxxxxx. Valid options are: DATABASE_URL, HEROKU_POSTGRESQL_AQUA_URL

What should I do? Could you give me some advice?


Solution

  • You should use:

    heroku pg:reset HEROKU_POSTGRESQL_AQUA