SQL 錯誤 (1071):Specified key was too long; max key length is 767 bytes

Key too long issue

utf8 時,會使用 255 * 3 = 765 (bytes)
utf8mb4 255 * 4 = 1020 (so limit length is 191)

Replace varchar(200) with varchar(191)

Reference: