mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
db
This commit is contained in:
parent
84a2197027
commit
e02ca2f7e3
@ -35,7 +35,7 @@ func initMysqlDB() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check the database and table during initialization
|
//Check the database and table during initialization
|
||||||
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s default charset utf8 COLLATE utf8_general_ci;", config.Config.Mysql.DBDatabaseName+"test1")
|
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s default charset utf8 COLLATE utf8_general_ci;", config.Config.Mysql.DBDatabaseName)
|
||||||
err = db.Exec(sql).Error
|
err = db.Exec(sql).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError("0", "Exec failed ", err.Error(), sql)
|
log.NewError("0", "Exec failed ", err.Error(), sql)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user