表初始化位置调整至mysql
This commit is contained in:
parent
747da175d7
commit
1ba9b3ab0a
|
|
@ -21,6 +21,7 @@ type Config struct {
|
||||||
ConnMaxLifetime int64 //ConnMaxLifetime 最大连接时间,单位:小时
|
ConnMaxLifetime int64 //ConnMaxLifetime 最大连接时间,单位:小时
|
||||||
MaxIdleConns int
|
MaxIdleConns int
|
||||||
MaxOpenConns int
|
MaxOpenConns int
|
||||||
|
InitTable bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init mysql初始化
|
// Init mysql初始化
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package mysql
|
||||||
|
|
||||||
|
func InitTable() error {
|
||||||
|
//不初始化表时返回
|
||||||
|
if !_conf.InitTable {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
//成功初始化后返回
|
||||||
|
return nil
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue