aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/railties
diff options
context:
space:
mode:
authorJerry Cheung <jollyjerry@gmail.com>2016-04-01 21:43:28 -0700
committerJerry Cheung <jollyjerry@gmail.com>2016-04-01 21:43:28 -0700
commit5e21f81ae95583498b39a521b4e0bb907b313c00 (patch)
treecb9c23ea942fda7c75876c38c7a3416f1c3b99fb /activerecord/lib/active_record/railties
parent863d385012824ac9a792b0c337f06c562914149f (diff)
downloadrails-5e21f81ae95583498b39a521b4e0bb907b313c00.tar.gz
rails-5e21f81ae95583498b39a521b4e0bb907b313c00.tar.bz2
rails-5e21f81ae95583498b39a521b4e0bb907b313c00.zip
Prevent db:schema:load to protected environments
Follow up to https://github.com/rails/rails/pull/22967 to protect against loading a schema on accident in production. cc @schneems
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r--activerecord/lib/active_record/railties/databases.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake
index 00cf8536e1..b1b169ae2f 100644
--- a/activerecord/lib/active_record/railties/databases.rake
+++ b/activerecord/lib/active_record/railties/databases.rake
@@ -256,7 +256,7 @@ db_namespace = namespace :db do
end
desc 'Loads a schema.rb file into the database'
- task :load => [:environment, :load_config] do
+ task :load => [:environment, :load_config, :check_protected_environments] do
ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA'])
end