mysql数据建表使用了longtext并且给了对应的索引导致以下错误:
BLOB/TEXT column 'sup_content' used in key specification without a key length

Mysql数据库对于BLOB/TEXT这样类型的数据结构只能索引前N个字符,所以没有设置长度的longtext不能用来做索引或者指定唯一性,如果对longtext类型指定长度,那么建表的时候会报以下错误:
check the manual that corresponds to your MariaDB server version for the right syntax to use near '(200) COLLATE utf8mb4_bin NOT NULL COMMENT '内容
如果想用索引,建议使用varchar类型,并且指定长度小于255(需要注意当数据长度大于255的时候varchar会自动转成smalltext类型,这时候对此字段索引也会爆出BLOB/TEXT column 'sup_content' used in key specification without a key length错误)。