diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2015-02-08 13:12:01 +0000 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2015-02-08 13:12:01 +0000 |
commit | 31fafe0a3223b58e214c03c88a33d6ef4435f63c (patch) | |
tree | f21a37bcdb5e16b75cf2e9010269594268aeebd1 /activerecord/lib/active_record/connection_adapters | |
parent | b1e6794238d7eac958cf146134220f6757fe0789 (diff) | |
parent | 0bbff5ee16d2bfe151975e868ddec0d2f0fd1fff (diff) | |
download | rails-31fafe0a3223b58e214c03c88a33d6ef4435f63c.tar.gz rails-31fafe0a3223b58e214c03c88a33d6ef4435f63c.tar.bz2 rails-31fafe0a3223b58e214c03c88a33d6ef4435f63c.zip |
Merge pull request #18602 from kamipo/respect_database_charset_and_collation
Respect the database default charset for `schema_migrations` table.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index 75f244b3f3..fac6f81540 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -39,7 +39,7 @@ module ActiveRecord MAX_INDEX_LENGTH_FOR_UTF8MB4 = 191 def initialize_schema_migrations_table - if @config[:encoding] == 'utf8mb4' + if charset == 'utf8mb4' ActiveRecord::SchemaMigration.create_table(MAX_INDEX_LENGTH_FOR_UTF8MB4) else ActiveRecord::SchemaMigration.create_table |