Skip to content
This repository
Browse code

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...
commit e41bd38ce6a09ccdb30a736afe88c076e7971e71 1 parent 3530afa
Ben Woosley Empact authored
2  activerecord/lib/active_record/railties/databases.rake
@@ -341,7 +341,7 @@ db_namespace = namespace :db do
341 341
342 342 namespace :schema do
343 343 desc 'Create a db/schema.rb file that can be portably used against any DB supported by AR'
344   - task :dump => :load_config do
  344 + task :dump => [:environment, :load_config] do
345 345 require 'active_record/schema_dumper'
346 346 filename = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
347 347 File.open(filename, "w:utf-8") do |file|

0 comments on commit e41bd38

Please sign in to comment.
Something went wrong with that request. Please try again.