heroku Heroku Postgres How to Reset Postgres Database in Heroku


Example

Steps to reset database in Heroku:

1. Drop the database, when SHARED_DATABASE_URL is used:

heroku pg:reset DATABASE

2. Recreate the database with nothing in it:

heroku run rake db:migrate

3. Populate the database with your seed data:

heroku run rake db:seed

Steps 2 and 3 can be combined into one command by executing this:

heroku run rake db:setup