アタッチ
$ heroku addons:attach app-staging::DATABASE -a app-dev Attaching postgresql-solid-12345 to app-dev... done Setting HEROKU_POSTGRESQL_MAROON config vars and restarting app-dev... done
確認
$ heroku pg:info -a app-dev === HEROKU_POSTGRESQL_MAROON_URL Plan: Hobby-basic Status: Available Connections: 0/20 PG Version: 9.5.2 Created: 2016-05-13 06:55 UTC Data Size: 257.1 MB Tables: 15 Rows: 697387/10000000 (In compliance) Fork/Follow: Unsupported Rollback: Unsupported Add-on: postgresql-solid-12345
$ heroku pg:promote HEROKU_POSTGRESQL_MAROON_URL -a app-dev Promoting postgresql-solid-12345 to DATABASE_URL on app-dev... done
確認
$ heroku config -a app-dev === app-dev Config Vars DATABASE_URL: postgres://useruser:passpass@ec2-54-32-10-11.compute-1.amazonaws.com:5432/dbname HEROKU_POSTGRESQL_MAROON_URL: postgres://useruser:passpass@ec2-54-32-10-11.compute-1.amazonaws.com:5432/dbname (snip)Tweet