So I'm new to ROR and Heroku and need a little help. I've created an app and have deployed it; however, I'd like to clear out the database associated with it. Meaning I'd like to clear any users (and their attached data) that have been created thus far.
I've basically created several phony accounts to test out whether the database on the production site works, but now i'd like to clear this out, and start with a fresh database.
Is this possible without deleting the database entirely?
Any help would be sincerely appreciated. Thank you very much for your time!
You can use heroku pg:reset DATABASE
command to reset the entire database. The command will simply drop and create the database.
You have to use heroku rake db:migrate
to create the tables then.
Alternatively you can use rake db:reset
command locally and then run heroku db:push
to update the production db.
heroku pg:reset DATABASE --confirm {app-name} heroku run rake db:migrate heroku run rake db:seed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With