Browse files

Changing rake db:schema:dump to run :environment as well as :load_con…

…fig, 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: 5df72a2#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".
  • Loading branch information...
1 parent 3530afa commit e41bd38ce6a09ccdb30a736afe88c076e7971e71 @Empact Empact committed Oct 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railties/databases.rake
2 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", "w:utf-8") do |file|

0 comments on commit e41bd38

Please sign in to comment.