mysqlpls.rb 595 B

1234567891011121314
  1. # see https://github.com/rails/rails/issues/9855#issuecomment-28874587
  2. # circumvents the default InnoDB limitation for index prefix bytes maximum when using proper 4byte UTF8 (utf8mb4)
  3. # (for server-side workaround see http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_large_prefix)
  4. if ENV['ON_HEROKU'].nil?
  5. require 'active_record/connection_adapters/abstract_mysql_adapter'
  6. module ActiveRecord
  7. module ConnectionAdapters
  8. class AbstractMysqlAdapter
  9. NATIVE_DATABASE_TYPES[:string] = { :name => "varchar", :limit => 191 }
  10. end
  11. end
  12. end
  13. end