mirror of
https://github.com/tiger1103/gfast.git
synced 2026-10-12 16:33:36 +00:00
数据库初始化
This commit is contained in:
@@ -43,6 +43,12 @@ func (c *sysDbInitController) GetEnvInfo(ctx context.Context, req *system.DbInit
|
||||
|
||||
// 创建配置文件及数据库等
|
||||
func (c *sysDbInitController) CreateDb(ctx context.Context, req *system.DbInitCreateDbReq) (res *system.DbInitCreateDbRes, err error) {
|
||||
// 生成数据库
|
||||
err = service.SysInit().CreateDataBaseByName(ctx, req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// 生成配置文件
|
||||
err = service.SysInit().CreateConfigFile(ctx, req)
|
||||
if err != nil {
|
||||
@@ -55,7 +61,7 @@ func (c *sysDbInitController) CreateDb(ctx context.Context, req *system.DbInitCr
|
||||
return
|
||||
}
|
||||
|
||||
// 生成数据库
|
||||
// 生成数据库表机构及数据
|
||||
err = service.SysInit().CreateDataBase(ctx, req.DbName)
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user