mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	!124 一些更新和bug
* fix: 代码合并 * feat:支持数据库版本兼容,目前兼容了oracle11g部分特性 * fix: 修改数据同步bug,数据sql里指定修改字段别,导致未正确记录修改字段值 * feat: 数据库迁移支持定时迁移和迁移到sql文件
This commit is contained in:
		
							
								
								
									
										28
									
								
								server/internal/db/domain/entity/db_transfer_file.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								server/internal/db/domain/entity/db_transfer_file.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
package entity
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"mayfly-go/pkg/model"
 | 
			
		||||
	"time"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type DbTransferFile struct {
 | 
			
		||||
	model.IdModel
 | 
			
		||||
	IsDeleted  int8       `orm:"column(is_deleted)" json:"-"`            // 是否删除 1是 0否
 | 
			
		||||
	CreateTime *time.Time `orm:"column(create_time)" json:"createTime"`  // 创建时间,默认当前时间戳
 | 
			
		||||
	Status     int8       `orm:"column(status)" json:"status"`           // 状态 1、执行中 2、执行成功 3、执行失败
 | 
			
		||||
	TaskId     uint64     `orm:"column(task_id)" json:"taskId"`          // 迁移任务ID
 | 
			
		||||
	LogId      uint64     `orm:"column(log_id)" json:"logId"`            // 日志ID
 | 
			
		||||
	FileDbType string     `orm:"column(file_db_type)" json:"fileDbType"` // sql文件数据库类型
 | 
			
		||||
	FileName   string     `orm:"column(file_name)" json:"fileName"`      // 显式文件名
 | 
			
		||||
	FileUuid   string     `orm:"column(file_uuid)" json:"fileUuid"`      // 文件真实id,拼接后可以下载
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (d *DbTransferFile) TableName() string {
 | 
			
		||||
	return "t_db_transfer_files"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	DbTransferFileStatusRunning int8 = 1
 | 
			
		||||
	DbTransferFileStatusSuccess int8 = 2
 | 
			
		||||
	DbTransferFileStatusFail    int8 = -1
 | 
			
		||||
)
 | 
			
		||||
		Reference in New Issue
	
	Block a user