oauth-plugin
oauth-plugin copied to clipboard
Specified key was too long; max key length is 767 bytes
consumer_tokens table t.string :token, :limit => 1024 # This has to be huge because of Yahoo's excessively large tokens change to : t.string :token, :limit => 128 :( ERROR 1071 (42000): Specified Key was too Long; Max Key Length is 767 Bytes.
Oops, didn't see it was already posted. I have posted the same issue with a temporary fix.
This is the way to do it in ruby (It maintains the token length as 1024 but restricts the index to 767.
create_table "consumer_tokens", :force => true do |t|
t.integer "person_id" t.string "type", :limit => 30 t.string "token", :limit => 1024 t.string "secret" t.datetime "created_at" t.datetime "updated_at" t.string "account" end
add_index "consumer_tokens", ["token"], :name => "index_consumer_tokens_on_token", :length => {"token"=>"767"}
Win... thanks for this.