mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-04-20 03:05:18 +08:00
!124 一些更新和bug
* fix: 代码合并 * feat:支持数据库版本兼容,目前兼容了oracle11g部分特性 * fix: 修改数据同步bug,数据sql里指定修改字段别,导致未正确记录修改字段值 * feat: 数据库迁移支持定时迁移和迁移到sql文件
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"cmp"
|
||||
sysapp "mayfly-go/internal/sys/application"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -33,7 +34,8 @@ func GetDbms() *Dbms {
|
||||
}
|
||||
|
||||
type DbBackupRestore struct {
|
||||
BackupPath string // 备份文件路径呢
|
||||
BackupPath string // 备份文件路径呢
|
||||
TransferPath string // 数据库迁移文件存储路径
|
||||
}
|
||||
|
||||
// 获取数据库备份配置
|
||||
@@ -43,11 +45,8 @@ func GetDbBackupRestore() *DbBackupRestore {
|
||||
|
||||
dbrc := new(DbBackupRestore)
|
||||
|
||||
backupPath := jm["backupPath"]
|
||||
if backupPath == "" {
|
||||
backupPath = "./db/backup"
|
||||
}
|
||||
dbrc.BackupPath = filepath.Join(backupPath)
|
||||
dbrc.BackupPath = filepath.Join(cmp.Or(jm["backupPath"], "./db/backup"))
|
||||
dbrc.TransferPath = filepath.Join(cmp.Or(jm["transferPath"], "./db/transfer"))
|
||||
|
||||
return dbrc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user