LoginSignup
1
0

More than 3 years have passed since last update.

Heroku Postgres じぶんまとめ

Last updated at Posted at 2020-04-29

プランアップする

1.まずは追加

新しいDatabaseをリソースから追加する。追加するときに、採用したいプランを選ぶ。
HEROKU_POSTGRESQL_CYAN のように追加される。PINKとか色の名前が割り当てられている模様。

2.copy

Database を追加した後、追加された HEROKU_POSTGRESQL_CYAN へコピーする。

heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_CYAN --app myapp

3. DATABASE 削除

古い方を削除。DATABASEがない状態になる。
フロントとめておくためにはメンテナンスモードにする。

4. attachment

同じ app に attach すると、DATABASEに割り当てられる。
その後、CYAN を削除する。

image.png

cf.

アップグレードの手順の中に、 copy の説明がある。

Upgrading the Version of a Heroku Postgres Database
https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases

CLIから指定するのはこちらに。
Sharing Heroku Postgres between applications
https://devcenter.heroku.com/articles/heroku-postgresql#sharing-heroku-postgres-between-applications

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0