aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/tasks/databases.rake1
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`