Im trying to rake db:schema:load but I get the error
Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX
From what I understand is that InnoDB only allows a max of 767 bytes in their index... And if you're using utf-8 it should be divided by 3.
But when i try to set a maximum of 100 characters (its not even close to 767) in the schema.rb the error still occurs...
schema.rb
add_index "friendly_id_slugs", ["slug", "sluggable_type"], :name => "index_friendly_id_slugs_on_slug_and_sluggable_type", :unique => true, :length => { :name => 100, :slug => 100, :sluggable_type => 40 }
Error
-- add_index("friendly_id_slugs", ["slug", "sluggable_type"], {:name=>"index_friendly_id_slugs_on_slug_and_sluggable_type", :unique=>true, :length=>{:name=>100, :slug=>100, :sluggable_type=>40}})
rake aborted!
Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `index_friendly_id_slugs_on_slug_and_sluggable_type` ON `friendly_id_slugs` (`slug`, `sluggable_type`)
MySQL
Your MySQL connection id is 1838
Server version: 5.5.22-0ubuntu1-log (Ubuntu)
What am I missing?