From 9b7640719345a8c4f9eecb8f7bccb6d1f6327aaa Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 11:18:32 +0800 Subject: [PATCH] Refactor code --- pkg/common/db/mysql.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index a257f7562..41347190b 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -53,13 +53,13 @@ func initMysqlDB() { log.NewInfo("open db ok ", dsn) - //db.AutoMigrate(&Friend{}, - // &FriendRequest{}, - // &Group{}, - // &GroupMember{}, - // &GroupRequest{}, - // &User{}, - // &Black{}) + db.AutoMigrate(&Friend{}, + &FriendRequest{}, + &Group{}, + &GroupMember{}, + &GroupRequest{}, + &User{}, + &Black{}) if !db.HasTable(&Friend{}) { log.NewInfo("CreateTable Friend")