修改MySQL枚举类型添加‘location‘值
要将’location’添加到fa_fastim_message表的type枚举字段中
具体步骤
首先,你需要查看当前type字段的所有枚举值:
SHOW COLUMNS FROM fa_fastim_message LIKE 'type';
【举例为:(‘text’,‘image’,‘audio’,‘video’,‘file’)】,当前枚举值是:
(‘voice’,
‘group_chat_notice’,
‘kbs_list’,
‘friend_apply’,
‘group_invitation’,
‘group_notice’,
‘group_apply’,
‘system’,
‘link’,
‘file’,
‘video’,
‘audio’,
‘image’,
‘default’)
那么修改语句是:
ALTER TABLE fa_fastim_message MODIFY COLUMN type ENUM('voice','group_chat_notice','kbs_list','friend_apply','group_invitation','group_notice','group_apply','system','link','file','video','audio','image','default','location')