diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-11-25 15:53:30 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-11-25 15:53:30 +0000 |
commit | a09824cfcc74847efd0eced904a682713a93d56b (patch) | |
tree | 7d0a0859fbd4e3382ae2033814b174ae76cce579 | |
parent | 1042de2370354ddb283eaa2a6c3a6166f7aaf0be (diff) | |
download | rails-a09824cfcc74847efd0eced904a682713a93d56b.tar.gz rails-a09824cfcc74847efd0eced904a682713a93d56b.tar.bz2 rails-a09824cfcc74847efd0eced904a682713a93d56b.zip |
Dump development database, not test database
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | railties/fresh_rakefile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index 3b746a49a5..ae50a21665 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 |