aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorBen Woosley <Ben.Woosley@gmail.com>2011-10-03 22:24:45 -0700
committerJosé Valim <jose.valim@gmail.com>2011-10-04 11:25:20 +0200
commit88f60fd1a744d93528dc36fa1461a59df3efc6a3 (patch)
tree61985183a9f2272abb34d8dc3576c056f8327e28 /activerecord
parent1eac9119620e9b537c1eca9619d4fa3ecb546149 (diff)
downloadrails-88f60fd1a744d93528dc36fa1461a59df3efc6a3.tar.gz
rails-88f60fd1a744d93528dc36fa1461a59df3efc6a3.tar.bz2
rails-88f60fd1a744d93528dc36fa1461a59df3efc6a3.zip
Changing rake db:schema:dump to run :environment as well as :load_config, as running :load_config alone will lead to the dumper being run without including extensions such as those included in foreigner and spatial_adapter.
This reverses a change made here: https://github.com/rails/rails/commit/5df72a238e9fcb18daf6ab6e6dc9051c9106d7bb#L0L324 I'm assuming here that :load_config needs to be invoked separately from :environment, as it is elsewhere in the file for db operations, if not the alternative is to go back to "task :dump => :environment do". Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord')
-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 b3316fd1a2..f4a813d704 100644
--- a/activerecord/lib/active_record/railties/databases.rake
+++ b/activerecord/lib/active_record/railties/databases.rake
@@ -341,7 +341,7 @@ db_namespace = namespace :db do
namespace :schema do
desc 'Create a db/schema.rb file that can be portably used against any DB supported by AR'
- task :dump => :load_config do
+ task :dump => [:environment, :load_config] do
require 'active_record/schema_dumper'
filename = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
File.open(filename, "w:utf-8") do |file|