Skip to content

Instantly share code, notes, and snippets.

@35d
Last active February 10, 2019 09:32
Show Gist options
  • Save 35d/b923c2fa7c856a05ebafcaa28315ad71 to your computer and use it in GitHub Desktop.
Save 35d/b923c2fa7c856a05ebafcaa28315ad71 to your computer and use it in GitHub Desktop.
📝 Heroku 設定メモ

複数 Heroku プロジェクトがある場合は --app <appName> を付ける必要がある

heroku config --app <appName>
heroku config:set DATABASE_URL='mysql2://<userName>:<password>@<host>/<database>?reconnect=true' --app <appName>

DB マイグレーション

heroku run rails db:migrate --app <appName>

ダンプファイルの流し込み

mysql --host=HOST --user=USER_NAME --password=PASSWORD --reconnect DB_NAME < backup.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment