aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-11-21 08:01:41 +0000
committerMarcel Molina <marcel@vernix.org>2005-11-21 08:01:41 +0000
commit7355d9f1bd9af02da0fb28eefeecf4fbee2aaf5b (patch)
treeeea10c7bfb1e9ccb488dbc024b52564d16fa4d11 /railties/lib/tasks
parent60091c1e2a7de4dcea5d7e2ccc6cc1f29a826807 (diff)
downloadrails-7355d9f1bd9af02da0fb28eefeecf4fbee2aaf5b.tar.gz
rails-7355d9f1bd9af02da0fb28eefeecf4fbee2aaf5b.tar.bz2
rails-7355d9f1bd9af02da0fb28eefeecf4fbee2aaf5b.zip
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/trunk@3136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r--railties/lib/tasks/databases.rake2
1 files changed, 1 insertions, 1 deletions
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