herokuのpostgresDBをdropする

とてもdropしたい。
2011年時点は、migrationを戻してる記事をよくみたけど今はそれ使えなかった。

現時点でdropするには、
pgコマンドでDBのURLを調べて、そのURLをresetコマンドでリセットする。という手順を踏まないといけないみたい。

$ heroku pg
=== HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL)
Plan:        Dev
Status:      available
Connections: 1
PG Version:  9.2.4
Created:     2013-08-08 10:38 UTC
Data Size:   6.4 MB
Tables:      2
Rows:        4/10000 (In compliance)
Fork/Follow: Unsupported

$ heroku pg:reset HEROKU_POSTGRESQL_COBALT_URL

 !    WARNING: Destructive Action
 !    This command will affect the app: watch-cat
 !    To proceed, type "watch-cat" or re-run this command with --confirm watch-cat

> watch-cat
Resetting HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL)... done
$ heroku pg
=== HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL)
Plan:        Dev
Status:      available
Connections: 1
PG Version:  9.2.4
Created:     2013-08-08 10:38 UTC
Data Size:   6.4 MB
Tables:      0
Rows:        0/10000 (In compliance)
Fork/Follow: Unsupported

テーブル消えているのでおk。

https://devcenter.heroku.com/articles/heroku-postgresql