Sha256: 6449d8fa449c9b2dbedd3c3c88c70439ac06cf57daf578153cd4dbc9819c1134

Contents?: true

Size: 461 Bytes

Versions: 1

Compression:

Stored size: 461 Bytes

Contents

require 'active_record/connection_adapters/abstract_mysql_adapter'

# Hack to set max varchar column size to 191 instead of 255.
# This is necessary to use mysql's utf8mb4 encoding and use
# full unicode support
module ActiveRecord
  module ConnectionAdapters
    class AbstractMysqlAdapter
      if ActiveRecord::Base.connection.adapter_name == 'Mysql2'
        NATIVE_DATABASE_TYPES[:string] = { :name => "varchar", :limit => 191 }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iqvoc-4.12.1 config/initializers/mysql_column_limit.rb