heroku/heroku — pull request #363 by hgimenez (2012-06-06 21:43:38+00:00)
Title: Promotes DATABASE_URL when we do a heroku pg:credentials --reset

When a user does a `heroku pg:credentials --reset` we can update the addon URL, but we can't override/promote to DATABASE_URL.

This commit promotes DATABASE_URL when necessary by invoking the existing `#promote` method. Output looks like this:

```
$ bundle exec bin/heroku pg:info brown
=== HEROKU_POSTGRESQL_BROWN (DATABASE_URL)
Conn Info:
[Deprecated] Please use `heroku pg:credentials HEROKU_POSTGRESQL_BROWN` to view connection info

Connections: 1
Created: 2012-05-29 19:47 UTC
Data Size: 16384
Fork/Follow: Unavailable
PG Version: 9.1.3
Plan: Dev
Rows: 0
Status: available
Tables: 1

$ bundle exec bin/heroku pg:credentials --reset brown
Resetting credentials for HEROKU_POSTGRESQL_BROWN (DATABASE_URL)... done
Promoting custom URL to DATABASE_URL... done
$
```