Skip to content

Commit

Permalink
Changing rake db:schema:dump to run :environment as well as :load_con…
Browse files Browse the repository at this point in the history
…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: rails@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
Empact committed Oct 4, 2011
1 parent 3530afa commit e41bd38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/railties/databases.rake
Expand Up @@ -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|
Expand Down

0 comments on commit e41bd38

Please sign in to comment.