支持存表情

pull/23/head
taoshihan1991 4 years ago
parent fa10fd642b
commit 6e40f4cb17

@ -50,7 +50,7 @@ CREATE TABLE `message` (
PRIMARY KEY (`id`),
KEY `kefu_id` (`kefu_id`),
KEY `visitor_id` (`visitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4|
DROP TABLE IF EXISTS `user_role`|
CREATE TABLE `user_role` (

@ -19,7 +19,7 @@ type Model struct {
func init() {
mysql := config.CreateMysql()
dsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8&parseTime=True&loc=Local", mysql.Username, mysql.Password, mysql.Server, mysql.Port, mysql.Database)
dsn := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", mysql.Username, mysql.Password, mysql.Server, mysql.Port, mysql.Database)
var err error
DB, err = gorm.Open("mysql", dsn)
if err != nil {

Loading…
Cancel
Save