Permalink
Browse files

Dump development database, not test database

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 1042de2 commit a09824cfcc74847efd0eced904a682713a93d56b @dhh dhh committed Nov 25, 2004
Showing with 4 additions and 4 deletions.
  1. +4 −4 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

0 comments on commit a09824c

Please sign in to comment.