diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-08 05:39:35 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-08 05:39:35 -0800 |
commit | b502e3db958fdfd27453db52f6f455183a449831 (patch) | |
tree | 45e2b00b6b57f54ae268d6eaf76de04ca3110a38 /activerecord/lib/active_record/tasks | |
parent | a03fed88f780922e3a3ab7b22af945f29a711ae4 (diff) | |
parent | a334425caff9b2140d5e99fcfc2eb8c4ab10bdfa (diff) | |
download | rails-b502e3db958fdfd27453db52f6f455183a449831.tar.gz rails-b502e3db958fdfd27453db52f6f455183a449831.tar.bz2 rails-b502e3db958fdfd27453db52f6f455183a449831.zip |
Merge pull request #13629 from dmathieu/drop_test
Be more explicit about the default of db:drop and db:create
Diffstat (limited to 'activerecord/lib/active_record/tasks')
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index afd493011e..6ce0495f6f 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -201,7 +201,8 @@ module ActiveRecord def each_current_configuration(environment) environments = [environment] - environments << 'test' if environment == 'development' + # add test environment only if no RAILS_ENV was specified. + environments << 'test' if environment == 'development' && ENV['RAILS_ENV'].nil? configurations = ActiveRecord::Base.configurations.values_at(*environments) configurations.compact.each do |configuration| |