さいしょに
ridgepoleは何も悪くないです。
事件
[ERROR] Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE UNIQUE INDEX `xxxxxx` USING btree ON `xxxxxxx` (`xxxxx`)
というエラーが出た。
t.string "xxxxx", limit: 255, null: true, collection: "utf8_general_ci"
add_index "xxxxxx", ["xxxxxx"], name: "key_twitter_exts_1", unique: true, using: :btree
と指定しているのでutf_general_ciが使われるはずなのだけど、どうもutf8mb4のままになっているっぽい。
原因
うーん…
うーん……?
あ!!!
タイポ
collectionじゃなくてcollationな。