clearing rails app database on heroku production site clearing rails app database on heroku production site database database

clearing rails app database on heroku production site


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:migrateheroku run rake db:seed


Login on Heroku through terminal and thenrun one of following commands:

heroku rake db:reset//or:    heroku run rake db:reset

The first one is an old one and the second is latest.