diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 9cf4f6c10c..7569e31edd 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make the db_schema_dump task honor the SCHEMA environment variable if present the way db_schema_import does. #2931. [Blair Zajac] + * Have the lighttpd server script report the actual ip to which the server is bound. #2903. [Adam] * Add plugin library directories to the load path after the lib directory so that libraries in the lib directory get precedence. #2910. [james.adam@gmail.com] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index f9fa722579..7f7d9d02a2 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -16,7 +16,7 @@ end desc "Create a db/schema.rb file that can be portably used against any DB supported by AR." task :db_schema_dump => :environment do require 'active_record/schema_dumper' - File.open("db/schema.rb", "w") do |file| + File.open(ENV['SCHEMA'] || "db/schema.rb", "w") do |file| ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file) end end