diff options
author | Kir Shatrov <shatrov@me.com> | 2017-04-30 17:58:42 -0400 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-04-30 17:58:50 -0400 |
commit | 40d3bbee9935a59fe68020b2f03bef9540c2d7c3 (patch) | |
tree | 797d3eca31404e5b5867a0dfd875700498517d1b /railties/lib/rails | |
parent | 7cb71c5ce37b7bc599de851d44eaa6a948daec03 (diff) | |
download | rails-40d3bbee9935a59fe68020b2f03bef9540c2d7c3.tar.gz rails-40d3bbee9935a59fe68020b2f03bef9540c2d7c3.tar.bz2 rails-40d3bbee9935a59fe68020b2f03bef9540c2d7c3.zip |
Friendly maintain schema failure
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/test_help.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 0f9bf98737..81537d813e 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -12,7 +12,12 @@ require "rails/generators/test_case" require "active_support/testing/autorun" if defined?(ActiveRecord::Base) - ActiveRecord::Migration.maintain_test_schema! + begin + ActiveRecord::Migration.maintain_test_schema! + rescue ActiveRecord::PendingMigrationError => e + puts e.to_s.strip + exit 1 + end module ActiveSupport class TestCase |