From b7a8f6c2a1beb12e7201d3ff8aaeee52c6626420 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 10 Feb 2022 11:41:34 +0800 Subject: [PATCH] db --- pkg/common/db/mysql.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 808cb8fc8..d075510b5 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -95,7 +95,10 @@ func initMysqlDB() { log.NewInfo("CreateTable Black") db.CreateTable(&Black{}) } - + if !db.HasTable(&ChatLog{}) { + log.NewInfo("CreateTable Black") + db.CreateTable(&ChatLog{}) + } return sqlTable := "CREATE TABLE IF NOT EXISTS `user` (" +