aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/invertible_migration_test.rb
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2012-12-22 12:10:40 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2012-12-22 20:40:42 -0500
commita4932d6a63e9883408537145e1f81477c27df3fc (patch)
tree09dd205dd8131fb1e24fa62e0adfc7b8bfd73b9d /activerecord/test/cases/invertible_migration_test.rb
parentf9da785d0b1b22317cfca25c15fb555e9016accb (diff)
downloadrails-a4932d6a63e9883408537145e1f81477c27df3fc.tar.gz
rails-a4932d6a63e9883408537145e1f81477c27df3fc.tar.bz2
rails-a4932d6a63e9883408537145e1f81477c27df3fc.zip
Fixes for PR [#8267]
* Fix Migration#reversible by not using `transaction`. * Adapt mysql adapter to updated api for remove_column * Update test after aedcd683684d08eaf30623a4b48ce31a31426372
Diffstat (limited to 'activerecord/test/cases/invertible_migration_test.rb')
-rw-r--r--activerecord/test/cases/invertible_migration_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/invertible_migration_test.rb b/activerecord/test/cases/invertible_migration_test.rb
index cf4e39c4ef..be59ffc4ab 100644
--- a/activerecord/test/cases/invertible_migration_test.rb
+++ b/activerecord/test/cases/invertible_migration_test.rb
@@ -89,8 +89,10 @@ module ActiveRecord
end
def teardown
- if ActiveRecord::Base.connection.table_exists?("horses")
- ActiveRecord::Base.connection.drop_table("horses")
+ %w[horses new_horses].each do |table|
+ if ActiveRecord::Base.connection.table_exists?(table)
+ ActiveRecord::Base.connection.drop_table(table)
+ end
end
end