diff options
author | Jerry Cheung <jollyjerry@gmail.com> | 2016-04-01 21:43:28 -0700 |
---|---|---|
committer | Jerry Cheung <jollyjerry@gmail.com> | 2016-04-01 21:43:28 -0700 |
commit | 5e21f81ae95583498b39a521b4e0bb907b313c00 (patch) | |
tree | cb9c23ea942fda7c75876c38c7a3416f1c3b99fb /activerecord/lib/active_record/railties | |
parent | 863d385012824ac9a792b0c337f06c562914149f (diff) | |
download | rails-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.rake | 2 |
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 |