aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-07-15 21:35:59 +0200
committerGitHub <noreply@github.com>2017-07-15 21:35:59 +0200
commit1dde3d32b7523b5b350c3db8eae8fbd736bb0332 (patch)
tree879b694f507f86bb1d085a40519f5c7c6e272c2a /activerecord
parentca63f6d1cc8854d3e113ffb94c1fcebeeb7f472e (diff)
parentcac0c7924db46474b0554f8da5b196d4fd9d9ed6 (diff)
downloadrails-1dde3d32b7523b5b350c3db8eae8fbd736bb0332.tar.gz
rails-1dde3d32b7523b5b350c3db8eae8fbd736bb0332.tar.bz2
rails-1dde3d32b7523b5b350c3db8eae8fbd736bb0332.zip
Merge pull request #29380 from y-yagi/insert_environment_value_to_table_before_check_environment
Insert environment value to `InternalMetadata` table before check environment
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb b/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
index 251a50e41e..e7459546e4 100644
--- a/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
@@ -1,6 +1,8 @@
require "cases/helper"
class SchemaMigrationsTest < ActiveRecord::Mysql2TestCase
+ self.use_transactional_tests = false
+
def test_renaming_index_on_foreign_key
connection.add_index "engines", "car_id"
connection.add_foreign_key :engines, :cars, name: "fk_engines_cars"
@@ -31,6 +33,8 @@ class SchemaMigrationsTest < ActiveRecord::Mysql2TestCase
assert connection.column_exists?(table_name, :key, :string)
end
+ ensure
+ ActiveRecord::InternalMetadata[:environment] = ActiveRecord::Migrator.current_environment
end
private