Permalink
Browse files

Apply [3136] to stable. Make the db_schema_dump task honor the SCHEMA…

… environment variable if present the way db_schema_import does. Closes #2931.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 743fb60 commit 4a9847f9870549ba5369f1da5038abeb290cad8c Marcel Molina committed Nov 21, 2005
Showing with 3 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG
  2. +1 −1 railties/lib/tasks/databases.rake
View
@@ -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]
+
* Make help for the console command more explicit about how to specify the desired environment in which to run the console. #2911. [anonymous]
* Introducing the session_migration generator. Creates an add_session_table migration. Allows generator to specify migrations directory. #2958, #2960 [Rick Olson]
@@ -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

0 comments on commit 4a9847f

Please sign in to comment.