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".

Signed-off-by: José Valim <>
  • Loading branch information...
1 parent 1eac911 commit 88f60fd1a744d93528dc36fa1461a59df3efc6a3 @Empact Empact committed with josevalim Oct 3, 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 88f60fd

Please sign in to comment.