Module: ActiveRecord::ConnectionAdapters::MySQL::SchemaStatements

Included in:
AbstractMysqlAdapter
Defined in:
lib/active_record/connection_adapters/mysql/schema_statements.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#internal_string_options_for_primary_keyObject


5
6
7
8
9
10
11
# File 'lib/active_record/connection_adapters/mysql/schema_statements.rb', line 5

def internal_string_options_for_primary_key
  super.tap do |options|
    if CHARSETS_OF_4BYTES_MAXLEN.include?(charset) && (mariadb? || version < "8.0.0")
      options[:collation] = collation.sub(/\A[^_]+/, "utf8")
    end
  end
end