diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-05 03:15:50 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-05 03:15:50 +0000 |
commit | 3d99d33a6456fd6da234635ba55b5bf1ce726c26 (patch) | |
tree | 7d630af2ad11dd91f0bb4fd10a04b04e1647f08a | |
parent | 203bfb25312542d622902d84d73c4862e3baa7bc (diff) | |
download | rails-3d99d33a6456fd6da234635ba55b5bf1ce726c26.tar.gz rails-3d99d33a6456fd6da234635ba55b5bf1ce726c26.tar.bz2 rails-3d99d33a6456fd6da234635ba55b5bf1ce726c26.zip |
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
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/tasks/databases.rake | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 963226000d..cc567cecf9 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -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] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 73bde972d1..e3272b86b4 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -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` |