简体   繁体   中英

heroku pg:reset DATABASE is not a heroku command?

I'm trying to reset a postgresql DB on my rails 5 app hosted on Heroku. This is not my first time so I type with full assurance the following command :

heroku pg:reset DATABASE

And then it's the drama. The console gives me the following output :

 ▸    pg:reset is not a heroku command.
 ▸    Perhaps you meant ps:resize?
 ▸    Run heroku _ to run heroku ps:resize DATABASE.
 ▸    Run heroku help for a list of available commands.

What I've tried with no success

heroku pg:reset DATABASE_URL
heroku pg:reset SHARED_DATABASE

In case you prefer to use Heroku Web-site:

  1. Go to https://postgres.heroku.com/databases

  2. Select the database you want to reset

  3. Scroll down and you will able to see Reset Database button.

  4. Click "Reset Database"

or if you want to do with command line then you need to update heroku CLI

https://devcenter.heroku.com/articles/heroku-cli

Are you running this command inside an app folder? if not then please use this syntax

heroku pg:reset [DATABASE] --app APP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM