thoughtbot/dotfiles — pull request #76 by croaky (2012-11-18 18:09:01+00:00)
Title: Create small, composable Heroku db scripts

db-backup-production:

* Create a new production database backup from Heroku.
* Converted from an alias to a script.

db-copy-production-to-staging:

* Copy latest production database backup into staging database.
* Converted from an alias to a script.

db-copy-production-to-development:

* Copy latest production database backup into development database using
preferred pgbackups + pg_restore method recommended by Heroku.
* Do not assume local development database name.
* Get local database name from config/database.yml.
* This did not previously exist in dotfiles.

Supporting changes for these commands:

* Add ~/.bin to the PATH.
* Add {staging,production}-{migrate,restart} aliases for faster typing
and tab completion during deploys.
* db-backup-url prints the latest backup URL.
* db-development-name prints the current development database name.
* Use consistent Heroku database naming convention prefixing with db-*.