feat: 修改配置文件,动态获取数据目录

This commit is contained in:
ssongliu
2023-01-29 16:38:34 +08:00
committed by ssongliu
parent dc5b6fba55
commit 4c4f379b4b
47 changed files with 457 additions and 190 deletions

View File

@@ -286,7 +286,7 @@ func (u *MysqlService) Delete(ctx context.Context, req dto.MysqlDBDelete) error
}
global.LOG.Info("execute delete database sql successful, now start to drop uploads and records")
uploadDir := fmt.Sprintf("%s/uploads/database/mysql/%s/%s", constant.DefaultDataDir, app.Name, db.Name)
uploadDir := fmt.Sprintf("%s/uploads/database/mysql/%s/%s", constant.DataDir, app.Name, db.Name)
if _, err := os.Stat(uploadDir); err == nil {
_ = os.RemoveAll(uploadDir)
}