Heroku useful commands

1. Access heroku database

$ heroku console

2. Delete heroku table

$ ModelName.delete_all

3.  Get all heroku releases

$ heroku releases

kl-new Releases
v31   Deploy cb9e22e   mpravin@maisasolutions.com   14m ago
v30   Deploy 0cee730   mpravin@maisasolutions.com   2012/06/22 11:08:36
v29   Deploy 07e6aa5   mpravin@maisasolutions.com   2012/06/22 10:31:06
v28   Deploy 40c13ba   mpravin@maisasolutions.com   2012/06/20 10:42:13
v27   Deploy 2464731   mpravin@maisasolutions.com   2012/06/19 16:19:16
v26   Deploy 99241c5   mpravin@maisasolutions.com   2012/06/19 15:43:15
v25   Deploy 2c7bb6e   mpravin@maisasolutions.com   2012/06/18 13:40:31
v24   Deploy f600d0a   mpravin@maisasolutions.com   2012/06/15 12:57:57
v23   Deploy b02fc6a   mpravin@maisasolutions.com   2012/06/15 12:45:32
v22   Deploy 79edf6d   mpravin@maisasolutions.com   2012/06/15 12:39:27

4. get detailed info on a release:

$ heroku releases:info v24

5. Roll back to the last release

$ heroku rollback

6. Rollback to specific version

$heroku rollback v31


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s