!110 feat: 支持各源数据库导出sql,数据库迁移部分bug修复

* feat: 各源数据库导出
* fix: 数据库迁移 bug修复
This commit is contained in:
zongyangleo
2024-03-26 09:05:28 +00:00
committed by Coder慌
parent 4b3ed1310d
commit 2acc295259
31 changed files with 821 additions and 424 deletions

View File

@@ -12,6 +12,7 @@ import (
"mayfly-go/pkg/req"
"strconv"
"strings"
"time"
)
type DbTransferTask struct {
@@ -53,13 +54,14 @@ func (d *DbTransferTask) DeleteTask(rc *req.Ctx) {
}
func (d *DbTransferTask) Run(rc *req.Ctx) {
start := time.Now()
taskId := d.changeState(rc, entity.DbTransferTaskRunStateRunning)
go d.DbTransferTask.Run(taskId, func(msg string, err error) {
// 修改状态为停止
if err != nil {
logx.Error(msg, err)
} else {
logx.Info(fmt.Sprintf("执行迁移完成,%s", msg))
logx.Info(fmt.Sprintf("执行迁移完成,%s, 耗时:%v", msg, time.Since(start)))
}
// 修改任务状态
task := new(entity.DbTransferTask)