Fixed that rake clone_structure_to_test should quit on pgsql if the dump is unsuccesful (closes #4585) [augustz@augustz.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2006-04-05 03:15:50 +00:00
parent 203bfb2531
commit 3d99d33a64
2 changed files with 3 additions and 0 deletions

@ -1,5 +1,7 @@
*SVN*
* Fixed that rake clone_structure_to_test should quit on pgsql if the dump is unsuccesful #4585 [augustz@augustz.com]
* Fixed that rails --version should have the return code of 0 (success) #4560 [blair@orcaware.com]
* Install alias so Rails::InfoController is accessible at /rails_info. Closes #4546. [Nicholas Seckar]

@ -47,6 +47,7 @@ namespace :db do
search_path = abcs[RAILS_ENV]["schema_search_path"]
search_path = "--schema=#{search_path}" if search_path
`pg_dump -i -U "#{abcs[RAILS_ENV]["username"]}" -s -x -O -f db/#{RAILS_ENV}_structure.sql #{search_path} #{abcs[RAILS_ENV]["database"]}`
raise "Error dumping database" if $?.exitstatus == 1
when "sqlite", "sqlite3"
dbfile = abcs[RAILS_ENV]["database"] || abcs[RAILS_ENV]["dbfile"]
`#{abcs[RAILS_ENV]["adapter"]} #{dbfile} .schema > db/#{RAILS_ENV}_structure.sql`