Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup message shown while running destructive action against protected database #24485

Merged

Conversation

prathamesh-sonpatki
Copy link
Member

r? @schneems
Looks like this now

$ RAILS_ENV=production rake db:structure:load
rake 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
/Users/prathamesh/Projects/sources/rails/activerecord/lib/active_record/tasks/database_tasks.rb:51:in `check_protected_environments!'
/Users/prathamesh/Projects/sources/rails/activerecord/lib/active_record/railties/databases.rake:11:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:structure:load => db:check_protected_environments
(See full trace by running task with --trace)

@schneems
Copy link
Member

Looks great, thanks!

@schneems schneems merged commit 0c3cdf6 into rails:master Apr 11, 2016
@prathamesh-sonpatki prathamesh-sonpatki deleted the protected_database_env_message branch April 11, 2016 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants