diff options
author | Martin Grandrath <mg@insfx.com> | 2012-10-15 10:58:01 +0300 |
---|---|---|
committer | Martin Grandrath <mg@insfx.com> | 2012-10-18 11:03:14 +0200 |
commit | 5042edabcf22be4026f19a451e682d02f7c1bec2 (patch) | |
tree | edcc73ea8b93f1408bb6c5ae340d7b54e0c3aaad /activerecord/lib/active_record/railties | |
parent | fc32ff4ee322d46c6658a6a2d484fd5f60c07178 (diff) | |
download | rails-5042edabcf22be4026f19a451e682d02f7c1bec2.tar.gz rails-5042edabcf22be4026f19a451e682d02f7c1bec2.tar.bz2 rails-5042edabcf22be4026f19a451e682d02f7c1bec2.zip |
Don't use test environment by default when running rake db:structure:load; #7951
`ENV['RAILS_ENV']` is not defined unless explicitly specified on the
command line when running `rake db:structure:load`.
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 69a9526fcc..0a9caa25b2 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -307,7 +307,7 @@ db_namespace = namespace :db do # desc "Recreate the databases from the structure.sql file" task :load => [:environment, :load_config] do - current_config = ActiveRecord::Tasks::DatabaseTasks.current_config(:env => (ENV['RAILS_ENV'] || 'test')) + current_config = ActiveRecord::Tasks::DatabaseTasks.current_config filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql") case current_config['adapter'] when /mysql/, /postgresql/, /sqlite/ |