aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb')
-rw-r--r--activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb b/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
index 605baa9905..d7d9a2d732 100644
--- a/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/schema_migrations_test.rb
@@ -1,6 +1,10 @@
+# frozen_string_literal: true
+
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"
@@ -18,7 +22,7 @@ class SchemaMigrationsTest < ActiveRecord::Mysql2TestCase
ActiveRecord::SchemaMigration.create_table
- assert connection.column_exists?(table_name, :version, :string, collation: "utf8_general_ci")
+ assert connection.column_exists?(table_name, :version, :string)
end
end
@@ -29,8 +33,10 @@ class SchemaMigrationsTest < ActiveRecord::Mysql2TestCase
ActiveRecord::InternalMetadata.create_table
- assert connection.column_exists?(table_name, :key, :string, collation: "utf8_general_ci")
+ assert connection.column_exists?(table_name, :key, :string)
end
+ ensure
+ ActiveRecord::InternalMetadata[:environment] = connection.migration_context.current_environment
end
private