From 796cb7bde2482f8c6b20ae6b8b4d69ef8b994ac0 Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Sun, 24 Dec 2023 18:16:10 +0800 Subject: [PATCH] fix db --- connection/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connection/database.go b/connection/database.go index fc3ba03d..6d9fb4ff 100644 --- a/connection/database.go +++ b/connection/database.go @@ -35,8 +35,6 @@ func ConnectMySQL() *sql.DB { log.Println(fmt.Sprintf("[connection] connected to mysql server (host: %s)", viper.GetString("mysql.host"))) } - InitRootUser(db) - CreateUserTable(db) CreateConversationTable(db) CreateSharingTable(db) @@ -91,6 +89,8 @@ func CreateUserTable(db *sql.DB) { if err != nil { fmt.Println(err) } + + InitRootUser(db) } func CreatePackageTable(db *sql.DB) {