Created
October 17, 2016 15:33
-
-
Save mmichael0413/29dedb60806e997a651d88180ad896a7 to your computer and use it in GitHub Desktop.
Initializer to fix Mysql2::Error: Specified key was too long; max key length is 767 bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record/connection_adapters/abstract_mysql_adapter' | |
module ActiveRecord | |
module ConnectionAdapters | |
class AbstractMysqlAdapter | |
NATIVE_DATABASE_TYPES[:string] = { :name => "varchar", :limit => 191 } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment