From a09824cfcc74847efd0eced904a682713a93d56b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 25 Nov 2004 15:53:30 +0000 Subject: [PATCH] Dump development database, not test database git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/fresh_rakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index 3b746a49a5e..ae50a21665f 100755 --- a/railties/fresh_rakefile +++ b/railties/fresh_rakefile @@ -84,11 +84,11 @@ end desc "Dump the database structure to a SQL file" task :db_structure_dump do - if ActiveRecord::Base.configurations["test"]["adapter"] == "mysql" - ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations["test"]) + if ActiveRecord::Base.configurations["development"]["adapter"] == "mysql" + ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations["development"]) File.open("db/development_structure.sql", "w+") { |f| f << ActiveRecord::Base.connection.structure_dump } - elsif ActiveRecord::Base.configurations["test"]["adapter"] == "postgresql" - `pg_dump -U #{ActiveRecord::Base.configurations["test"]["username"]} -s -f db/development_structure.sql #{ActiveRecord::Base.configurations["test"]["database"]}` + elsif ActiveRecord::Base.configurations["development"]["adapter"] == "postgresql" + `pg_dump -U #{ActiveRecord::Base.configurations["development"]["username"]} -s -f db/development_structure.sql #{ActiveRecord::Base.configurations["development"]["database"]}` end end