エラー内容
開発でrails db:migrate:resetを本番環境でした際に、
$ rails db:migrate:reset RAILS_ENV=production
Creating network "child_app_default" with the default driver
rails aborted!
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
とエラーが出た。
対処法
DISABLE_DATABASE_ENVIRONMENT_CHECK=1をつけてあげるだけ!
$ rails db:migrate:reset RAILS_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1
これで実行できます!