mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 07:50:25 +08:00
feat: 系统升级支持数据库自动迁移,避免手动执行升级脚本
This commit is contained in:
@@ -23,8 +23,6 @@ aes:
|
||||
key: 1111111111111111
|
||||
# 若存在mysql配置,优先使用mysql
|
||||
mysql:
|
||||
# 自动升级数据库
|
||||
auto-migration: false
|
||||
host: mysql:3306
|
||||
username: root
|
||||
password: 111049
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module mayfly-go
|
||||
|
||||
go 1.23.0
|
||||
go 1.24
|
||||
|
||||
require (
|
||||
gitee.com/chunanyong/dm v1.8.18
|
||||
@@ -9,7 +9,7 @@ require (
|
||||
github.com/emirpasic/gods v1.18.1
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/glebarez/sqlite v1.11.0
|
||||
github.com/go-gormigrate/gormigrate/v2 v2.1.0
|
||||
github.com/go-gormigrate/gormigrate/v2 v2.1.3
|
||||
github.com/go-ldap/ldap/v3 v3.4.8
|
||||
github.com/go-playground/locales v0.14.1
|
||||
github.com/go-playground/universal-translator v0.18.1
|
||||
@@ -20,21 +20,21 @@ require (
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20230712084735-068dc2aee82d
|
||||
github.com/may-fly/cast v1.7.1
|
||||
github.com/microsoft/go-mssqldb v1.7.2
|
||||
github.com/mojocn/base64Captcha v1.3.6 // 验证码
|
||||
github.com/microsoft/go-mssqldb v1.8.0
|
||||
github.com/mojocn/base64Captcha v1.3.8 // 验证码
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/sftp v1.13.7
|
||||
github.com/pquerna/otp v1.4.0
|
||||
github.com/redis/go-redis/v9 v9.7.0
|
||||
github.com/robfig/cron/v3 v3.0.1 // 定时任务
|
||||
github.com/sijms/go-ora/v2 v2.8.22
|
||||
github.com/stretchr/testify v1.9.0
|
||||
github.com/sijms/go-ora/v2 v2.8.23
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/tidwall/gjson v1.18.0
|
||||
github.com/veops/go-ansiterm v0.0.5
|
||||
go.mongodb.org/mongo-driver v1.16.0 // mongo
|
||||
golang.org/x/crypto v0.32.0 // ssh
|
||||
golang.org/x/oauth2 v0.25.0
|
||||
golang.org/x/sync v0.10.0
|
||||
golang.org/x/crypto v0.33.0 // ssh
|
||||
golang.org/x/oauth2 v0.26.0
|
||||
golang.org/x/sync v0.11.0
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
// gorm
|
||||
@@ -71,15 +71,15 @@ require (
|
||||
github.com/kr/fs v0.1.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.17 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/montanaflynn/stats v0.7.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.4.3 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/tjfoc/gmsm v1.4.1 // indirect
|
||||
@@ -89,12 +89,12 @@ require (
|
||||
github.com/xdg-go/scram v1.1.2 // indirect
|
||||
github.com/xdg-go/stringprep v1.0.4 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||
golang.org/x/arch v0.8.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
|
||||
golang.org/x/image v0.13.0 // indirect
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sys v0.29.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
golang.org/x/arch v0.14.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
|
||||
golang.org/x/image v0.23.0 // indirect
|
||||
golang.org/x/net v0.33.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
golang.org/x/text v0.22.0 // indirect
|
||||
google.golang.org/protobuf v1.34.1 // indirect
|
||||
modernc.org/libc v1.22.5 // indirect
|
||||
modernc.org/mathutil v1.5.0 // indirect
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
type Oauth2Account struct {
|
||||
model.DeletedModel
|
||||
|
||||
AccountId uint64 `json:"accountId" gorm:"column:account_id;index:account_id,unique"`
|
||||
Identity string `json:"identity" gorm:"column:identity;index:identity,unique"`
|
||||
AccountId uint64 `json:"accountId" gorm:"not null;column:account_id;index:account_id,unique;comment:账号ID"`
|
||||
Identity string `json:"identity" gorm:"size:64;column:identity;index:idx_identity,unique;comment:身份标识"`
|
||||
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
UpdateTime *time.Time `json:"updateTime"`
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;"`
|
||||
UpdateTime *time.Time `json:"updateTime" gorm:"not null;"`
|
||||
}
|
||||
|
||||
func (Oauth2Account) TableName() string {
|
||||
|
||||
@@ -159,7 +159,7 @@ func (app *dataSyncAppImpl) RunCronJob(ctx context.Context, id uint64) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
return errorx.NewBiz("get column data type")
|
||||
return errorx.NewBiz("get column data type... ignore~")
|
||||
})
|
||||
|
||||
updSql = fmt.Sprintf("and %s > %s", task.UpdField, updFieldDataType.DataType.SQLValue(task.UpdFieldVal))
|
||||
@@ -394,7 +394,7 @@ func (app *dataSyncAppImpl) saveLog(log *entity.DataSyncLog) {
|
||||
func (app *dataSyncAppImpl) InitCronJob() {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
logx.ErrorTrace("the data synchronization task failed to initialize: %s", err.(error))
|
||||
logx.ErrorTrace("the data synchronization task failed to initialize", err)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -410,7 +410,12 @@ func (app *dataSyncAppImpl) InitCronJob() {
|
||||
cond.Status = entity.DataSyncTaskStatusEnable
|
||||
jobs := new([]entity.DataSyncTask)
|
||||
|
||||
pr, _ := app.GetPageList(cond, pageParam, jobs)
|
||||
pr, err := app.GetPageList(cond, pageParam, jobs)
|
||||
if err != nil {
|
||||
logx.ErrorTrace("the data synchronization task failed to initialize", err)
|
||||
return
|
||||
}
|
||||
|
||||
total := pr.Total
|
||||
add := 0
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
type Db struct {
|
||||
model.Model
|
||||
|
||||
Code string `orm:"column(code)" json:"code"`
|
||||
Name string `orm:"column(name)" json:"name"`
|
||||
GetDatabaseMode DbGetDatabaseMode `json:"getDatabaseMode"` // 获取数据库方式
|
||||
Database string `orm:"column(database)" json:"database"`
|
||||
Remark string `json:"remark"`
|
||||
InstanceId uint64
|
||||
AuthCertName string `json:"authCertName"`
|
||||
Code string `json:"code" gorm:"size:32;not null;index:idx_code"`
|
||||
Name string `json:"name" gorm:"size:255;not null;"`
|
||||
GetDatabaseMode DbGetDatabaseMode `json:"getDatabaseMode" gorm:"comment:库名获取方式(-1.实时获取、1.指定库名)"` // 获取数据库方式
|
||||
Database string `json:"database" gorm:"size:2000;"`
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
InstanceId uint64 `json:"instanceId" gorm:"not null;"`
|
||||
AuthCertName string `json:"authCertName" gorm:"size:255;"`
|
||||
}
|
||||
|
||||
type DbGetDatabaseMode int8
|
||||
|
||||
@@ -5,34 +5,35 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// DataSyncTask 数据同步
|
||||
type DataSyncTask struct {
|
||||
model.Model
|
||||
|
||||
// 基本信息
|
||||
TaskName string `orm:"column(task_name)" json:"taskName"` // 任务名
|
||||
TaskCron string `orm:"column(task_cron)" json:"taskCron"` // 任务Cron表达式
|
||||
Status int8 `orm:"column(status)" json:"status"` // 状态 1启用 2禁用
|
||||
TaskKey string `orm:"column(key)" json:"taskKey"` // 任务唯一标识
|
||||
RecentState int8 `orm:"column(recent_state)" json:"recentState"` // 最近执行状态 1成功 -1失败
|
||||
RunningState int8 `orm:"column(running_state)" json:"runningState"` // 运行时状态 1运行中、2待运行、3已停止
|
||||
TaskName string `json:"taskName" gorm:"not null;size:255;comment:任务名"` // 任务名
|
||||
TaskCron string `json:"taskCron" gorm:"not null;size:50;comment:任务Cron表达式"` // 任务Cron表达式
|
||||
Status int8 `json:"status" gorm:"not null;default:1;comment:状态 1启用 2禁用"` // 状态 1启用 2禁用
|
||||
TaskKey string `json:"taskKey" gorm:"size:100;comment:任务唯一标识"` // 任务唯一标识
|
||||
RecentState int8 `json:"recentState" gorm:"not null;default:0;comment:最近执行状态 1成功 -1失败"` // 最近执行状态 1成功 -1失败
|
||||
RunningState int8 `json:"runningState" gorm:"not null;default:2;comment:运行时状态 1运行中、2待运行、3已停止"` // 运行时状态 1运行中、2待运行、3已停止
|
||||
|
||||
// 源数据库信息
|
||||
SrcDbId int64 `orm:"column(src_db_id)" json:"srcDbId"`
|
||||
SrcDbName string `orm:"column(src_db_name)" json:"srcDbName"`
|
||||
SrcTagPath string `orm:"column(src_tag_path)" json:"srcTagPath"`
|
||||
DataSql string `orm:"column(data_sql)" json:"dataSql"` // 数据源查询sql
|
||||
PageSize int `orm:"column(page_size)" json:"pageSize"` // 配置分页sql查询的条数
|
||||
UpdField string `orm:"column(upd_field)" json:"updField"` // 更新字段, 选择由哪个字段为更新字段,查询数据源的时候会带上这个字段,如:where update_time > {最近更新的最大值}
|
||||
UpdFieldVal string `orm:"column(upd_field_val)" json:"updFieldVal"` // 更新字段当前值
|
||||
UpdFieldSrc string `orm:"column(upd_field_src)" json:"updFieldSrc"` // 更新值来源, 如select name as user_name from user; 则updFieldSrc的值为user_name
|
||||
SrcDbId int64 `json:"srcDbId" gorm:"not null;comment:源数据库ID"` // 源数据库ID
|
||||
SrcDbName string `json:"srcDbName" gorm:"size:100;comment:源数据库名"` // 源数据库名
|
||||
SrcTagPath string `json:"srcTagPath" gorm:"size:200;comment:源数据库tag路径"` // 源数据库tag路径
|
||||
DataSql string `json:"dataSql" gorm:"not null;type:text;comment:数据查询sql"` // 数据源查询sql
|
||||
PageSize int `json:"pageSize" gorm:"not null;comment:数据同步分页大小"` // 配置分页sql查询的条数
|
||||
UpdField string `json:"updField" gorm:"not null;size:100;default:'id';comment:更新字段,默认'id'"` // 更新字段, 选择由哪个字段为更新字段,查询数据源的时候会带上这个字段,如:where update_time > {最近更新的最大值}
|
||||
UpdFieldVal string `json:"updFieldVal" gorm:"size:100;comment:当前更新值"` // 更新字段当前值
|
||||
UpdFieldSrc string `json:"updFieldSrc" gorm:"comment:更新值来源, 如select name as user_name from user; 则updFieldSrc的值为user_name"` // 更新值来源, 如select name as user_name from user; 则updFieldSrc的值为user_name
|
||||
|
||||
// 目标数据库信息
|
||||
TargetDbId int64 `orm:"column(target_db_id)" json:"targetDbId"`
|
||||
TargetDbName string `orm:"column(target_db_name)" json:"targetDbName"`
|
||||
TargetTagPath string `orm:"column(target_tag_path)" json:"targetTagPath"`
|
||||
TargetTableName string `orm:"column(target_table_name)" json:"targetTableName"`
|
||||
FieldMap string `orm:"column(field_map)" json:"fieldMap"` // 字段映射json
|
||||
DuplicateStrategy int `orm:"column(duplicate_strategy)" json:"duplicateStrategy"` // 冲突策略 -1:无,1:忽略,2:覆盖
|
||||
TargetDbId int64 `json:"targetDbId" gorm:"not null;comment:目标数据库ID"` // 目标数据库ID
|
||||
TargetDbName string `json:"targetDbName" gorm:"size:150;comment:目标数据库名"` // 目标数据库名
|
||||
TargetTagPath string `json:"targetTagPath" gorm:"size:255;comment:目标数据库tag路径"` // 目标数据库tag路径
|
||||
TargetTableName string `json:"targetTableName" gorm:"size:150;comment:目标数据库表名"` // 目标数据库表名
|
||||
FieldMap string `json:"fieldMap" gorm:"type:text;comment:字段映射json"` // 字段映射json
|
||||
DuplicateStrategy int `json:"duplicateStrategy" gorm:"not null;default:-1;comment:唯一键冲突策略 -1:无,1:忽略,2:覆盖"` // 冲突策略 -1:无,1:忽略,2:覆盖
|
||||
}
|
||||
|
||||
func (d *DataSyncTask) TableName() string {
|
||||
@@ -41,12 +42,13 @@ func (d *DataSyncTask) TableName() string {
|
||||
|
||||
type DataSyncLog struct {
|
||||
model.IdModel
|
||||
TaskId uint64 `orm:"column(task_id)" json:"taskId"` // 任务表id
|
||||
CreateTime *time.Time `orm:"column(create_time)" json:"createTime"`
|
||||
DataSqlFull string `orm:"column(data_sql_full)" json:"dataSqlFull"` // 执行的完整sql
|
||||
ResNum int `orm:"column(res_num)" json:"resNum"` // 收到数据条数
|
||||
ErrText string `orm:"column(err_text)" json:"errText"` // 错误日志
|
||||
Status int8 `orm:"column(status)" json:"status"` // 状态:1.成功 -1.失败
|
||||
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;"` // 创建时间
|
||||
TaskId uint64 `json:"taskId" gorm:"not null;comment:同步任务表id"` // 任务表id
|
||||
DataSqlFull string `json:"dataSqlFull" gorm:"not null;type:text;comment:执行的完整sql"` // 执行的完整sql
|
||||
ResNum int `json:"resNum" gorm:"comment:收到数据条数"` // 收到数据条数
|
||||
ErrText string `json:"errText" gorm:"type:text;comment:日志"` // 日志
|
||||
Status int8 `json:"status" gorm:"not null;default:1;comment:状态:1.成功 0.失败"` // 状态:1.成功 0.失败
|
||||
}
|
||||
|
||||
func (d *DataSyncLog) TableName() string {
|
||||
|
||||
@@ -5,18 +5,19 @@ import (
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
// DbInstance 数据库实例信息
|
||||
type DbInstance struct {
|
||||
model.Model
|
||||
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"` // 类型,mysql oracle等
|
||||
Host string `json:"host"`
|
||||
Code string `json:"code" gorm:"size:32;not null;"`
|
||||
Name string `json:"name" gorm:"size:32;not null;"`
|
||||
Type string `json:"type" gorm:"size:32;not null;"` // 类型,mysql oracle等
|
||||
Host string `json:"host" gorm:"size:255;not null;"`
|
||||
Port int `json:"port"`
|
||||
Network string `json:"network"`
|
||||
Extra *string `json:"extra"` // 连接需要的其他额外参数(json格式), 如oracle需要sid等
|
||||
Params *string `json:"params"` // 使用指针类型,可更新为零值(空字符串)
|
||||
Remark *string `json:"remark"`
|
||||
Network string `json:"network" gorm:"size:20;"`
|
||||
Extra *string `json:"extra" gorm:"size:1000;comment:连接需要的额外参数,如oracle数据库需要sid等"` // 连接需要的其他额外参数(json格式), 如oracle需要sid等
|
||||
Params *string `json:"params" gorm:"size:255;comment:其他连接参数"` // 使用指针类型,可更新为零值(空字符串)
|
||||
Remark *string `json:"remark" gorm:"size:255;"`
|
||||
SshTunnelMachineId int `json:"sshTunnelMachineId"` // ssh隧道机器id
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,13 @@ import (
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
// DbSql 用户保存的数据库sql
|
||||
type DbSql struct {
|
||||
model.Model `orm:"-"`
|
||||
|
||||
DbId uint64 `json:"dbId"`
|
||||
Db string `json:"db"`
|
||||
Type int `json:"type"` // 类型
|
||||
Sql string `json:"sql"`
|
||||
Name string `json:"name"`
|
||||
DbId uint64 `json:"dbId" gorm:"not null;"`
|
||||
Db string `json:"db" gorm:"size:100;not null;"`
|
||||
Type int `json:"type" gorm:"not null;"` // 类型
|
||||
Sql string `json:"sql" gorm:"size:4000;comment:sql语句"`
|
||||
Name string `json:"name" gorm:"size:255;not null;comment:sql模板名"`
|
||||
}
|
||||
|
||||
@@ -8,17 +8,17 @@ import (
|
||||
type DbSqlExec struct {
|
||||
model.Model `orm:"-"`
|
||||
|
||||
DbId uint64 `json:"dbId"`
|
||||
Db string `json:"db"`
|
||||
Table string `json:"table"`
|
||||
Type int8 `json:"type"` // 类型
|
||||
Sql string `json:"sql"` // 执行的sql
|
||||
OldValue string `json:"oldValue"`
|
||||
Remark string `json:"remark"`
|
||||
Status int8 `json:"status"` // 执行状态
|
||||
Res string `json:"res"` // 执行结果
|
||||
DbId uint64 `json:"dbId" gorm:"not null;"`
|
||||
Db string `json:"db" gorm:"size:150;not null;"`
|
||||
Table string `json:"table" gorm:"size:150;"`
|
||||
Type int8 `json:"type" gorm:"not null;"` // 类型
|
||||
Sql string `json:"sql" gorm:"size:5000;not null;"` // 执行的sql
|
||||
OldValue string `json:"oldValue" gorm:"size:5000;"`
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
Status int8 `json:"status"` // 执行状态
|
||||
Res string `json:"res" gorm:"size:1000;"` // 执行结果
|
||||
|
||||
FlowBizKey string `json:"flowBizKey"` // 流程业务key
|
||||
FlowBizKey string `json:"flowBizKey" gorm:"size:50;index:idx_flow_biz_key;comment:流程关联的业务key"` // 流程业务key
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,34 +7,33 @@ import (
|
||||
type DbTransferTask struct {
|
||||
model.Model
|
||||
|
||||
RunningState int8 `orm:"column(running_state)" json:"runningState"` // 运行状态
|
||||
TaskName string `json:"taskName" gorm:"size:255;not null;"` // 任务名称
|
||||
TaskKey string `json:"taskKey" gorm:"size:100;not null;"` // 定时任务唯一uuid key
|
||||
CronAble int8 `json:"cronAble" gorm:"default:-1;not null;"` // 是否定时 1是 -1否
|
||||
Cron string `json:"cron" gorm:"size:32;"` // 定时任务cron表达式
|
||||
Mode int8 `json:"mode"` // 数据迁移方式,1、迁移到数据库 2、迁移到文件
|
||||
TargetFileDbType string `json:"targetFileDbType" gorm:"size:32;"` // 目标文件数据库类型
|
||||
FileSaveDays int `json:"fileSaveDays"` // 文件保存天数
|
||||
Status int8 `json:"status"` // 启用状态 1启用 -1禁用
|
||||
RunningState int8 `json:"runningState"` // 运行状态
|
||||
LogId uint64 `json:"logId"`
|
||||
TaskName string `orm:"column(task_name)" json:"taskName"` // 任务名称
|
||||
Status int8 `orm:"column(status)" json:"status"` // 启用状态 1启用 -1禁用
|
||||
CronAble int8 `orm:"column(cron_able)" json:"cronAble"` // 是否定时 1是 -1否
|
||||
Cron string `orm:"column(cron)" json:"cron"` // 定时任务cron表达式
|
||||
Mode int8 `orm:"column(mode)" json:"mode"` // 数据迁移方式,1、迁移到数据库 2、迁移到文件
|
||||
TargetFileDbType string `orm:"column(target_file_db_type)" json:"targetFileDbType"` // 目标文件数据库类型
|
||||
FileSaveDays int `json:"fileSaveDays"` // 文件保存天数
|
||||
TaskKey string `orm:"column(key)" json:"taskKey"` // 定时任务唯一uuid key
|
||||
|
||||
CheckedKeys string `orm:"column(checked_keys)" json:"checkedKeys"` // 选中需要迁移的表
|
||||
DeleteTable int `orm:"column(delete_table)" json:"deleteTable"` // 创建表前是否删除表
|
||||
NameCase int `orm:"column(name_case)" json:"nameCase"` // 表名、字段大小写转换 1无 2大写 3小写
|
||||
Strategy int `orm:"column(strategy)" json:"strategy"` // 迁移策略 1全量 2增量
|
||||
CheckedKeys string `json:"checkedKeys" gorm:"type:text;"` // 选中需要迁移的表
|
||||
DeleteTable int8 `json:"deleteTable"` // 创建表前是否删除表
|
||||
NameCase int8 `json:"nameCase"` // 表名、字段大小写转换 1无 2大写 3小写
|
||||
Strategy int8 `json:"strategy"` // 迁移策略 1全量 2增量
|
||||
|
||||
SrcDbId int64 `orm:"column(src_db_id)" json:"srcDbId"` // 源库id
|
||||
SrcDbName string `orm:"column(src_db_name)" json:"srcDbName"` // 源库名
|
||||
SrcTagPath string `orm:"column(src_tag_path)" json:"srcTagPath"` // 源库tagPath
|
||||
SrcDbType string `orm:"column(src_db_type)" json:"srcDbType"` // 源库类型
|
||||
SrcInstName string `orm:"column(src_inst_name)" json:"srcInstName"` // 源库实例名
|
||||
|
||||
TargetDbId int `orm:"column(target_db_id)" json:"targetDbId"` // 目标库id
|
||||
TargetDbName string `orm:"column(target_db_name)" json:"targetDbName"` // 目标库名
|
||||
TargetDbType string `orm:"column(target_tag_path)" json:"targetDbType"` // 目标库类型
|
||||
TargetInstName string `orm:"column(target_db_type)" json:"targetInstName"` // 目标库实例名
|
||||
TargetTagPath string `orm:"column(target_inst_name)" json:"targetTagPath"` // 目标库tagPath
|
||||
SrcDbId int64 `json:"srcDbId" gorm:"not null;"` // 源库id
|
||||
SrcDbName string `json:"srcDbName" gorm:"size:255;not null;"` // 源库名
|
||||
SrcTagPath string `json:"srcTagPath" gorm:"size:255;"` // 源库tagPath
|
||||
SrcDbType string `json:"srcDbType" gorm:"size:32;not null;"` // 源库类型
|
||||
SrcInstName string `json:"srcInstName" gorm:"size:255;"` // 源库实例名
|
||||
|
||||
TargetDbId int `json:"targetDbId" gorm:"not null;"` // 目标库id
|
||||
TargetDbName string `json:"targetDbName" gorm:"size:255;not null;"` // 目标库名
|
||||
TargetDbType string `json:"targetDbType" gorm:"size:32;not null;"` // 目标库类型
|
||||
TargetInstName string `json:"targetInstName" gorm:"size:255;"` // 目标库实例名
|
||||
TargetTagPath string `json:"targetTagPath" gorm:"size:255;"` // 目标库tagPath
|
||||
}
|
||||
|
||||
func (d *DbTransferTask) TableName() string {
|
||||
|
||||
@@ -5,15 +5,16 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// DbTransferFile 数据库迁移文件管理
|
||||
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文件数据库类型
|
||||
FileKey string `orm:"column(file_key)" json:"fileKey"` // 文件
|
||||
IsDeleted int8 `json:"-" gorm:"default:0;"` // 是否删除 1是 0否
|
||||
CreateTime *time.Time `json:"createTime"` // 创建时间,默认当前时间戳
|
||||
Status int8 `json:"status" gorm:"default:1;comment:状态 1、执行中 2、执行成功 3、执行失败"` // 状态 1、执行中 2、执行成功 3、执行失败
|
||||
TaskId uint64 `json:"taskId" gorm:"comment:迁移任务ID"` // 迁移任务ID
|
||||
LogId uint64 `json:"logId" gorm:"comment:日志ID"` // 日志ID
|
||||
FileDbType string `json:"fileDbType" gorm:"size:32;comment:sql文件数据库类型"` // sql文件数据库类型
|
||||
FileKey string `json:"fileKey" gorm:"size:50;comment:文件"` // 文件
|
||||
}
|
||||
|
||||
func (d *DbTransferFile) TableName() string {
|
||||
|
||||
@@ -5,9 +5,9 @@ import "mayfly-go/pkg/model"
|
||||
type File struct {
|
||||
model.Model
|
||||
|
||||
FileKey string `json:"fikeKey"` // 文件key
|
||||
Filename string `json:"filename"` // 文件名
|
||||
Path string `json:"path" ` // 文件路径
|
||||
FileKey string `json:"fikeKey" gorm:"size:32;not null;"` // 文件key
|
||||
Filename string `json:"filename" gorm:"size:255;not null;"` // 文件名
|
||||
Path string `json:"path" gorm:"size:500;"` // 文件路径
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ import (
|
||||
type Procdef struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name" form:"name"` // 名称
|
||||
DefKey string `json:"defKey" form:"defKey"` //
|
||||
Tasks string `json:"tasks"` // 审批节点任务信息
|
||||
Status ProcdefStatus `json:"status"` // 状态
|
||||
Condition *string `json:"condition"` // 触发审批的条件(计算结果返回1则需要启用该流程)
|
||||
Remark *string `json:"remark"`
|
||||
Name string `json:"name" form:"name" gorm:"size:150;comment:流程名称"` // 名称
|
||||
DefKey string `json:"defKey" form:"defKey" gorm:"not null;size:100;comment:流程定义key"` //
|
||||
Tasks string `json:"tasks" gorm:"not null;size:3000;comment:审批节点任务信息"` // 审批节点任务信息
|
||||
Status ProcdefStatus `json:"status" gorm:"comment:状态"` // 状态
|
||||
Condition *string `json:"condition" gorm:"type:text;comment:触发审批的条件(计算结果返回1则需要启用该流程)"` // 触发审批的条件(计算结果返回1则需要启用该流程)
|
||||
Remark *string `json:"remark" gorm:"size:255;"`
|
||||
}
|
||||
|
||||
func (p *Procdef) TableName() string {
|
||||
|
||||
@@ -10,19 +10,19 @@ import (
|
||||
type Procinst struct {
|
||||
model.Model
|
||||
|
||||
ProcdefId uint64 `json:"procdefId"` // 流程定义id
|
||||
ProcdefName string `json:"procdefName"` // 流程定义名称
|
||||
ProcdefId uint64 `json:"procdefId" gorm:"not null;index:idx_procdef_id;comment:流程定义id"` // 流程定义id
|
||||
ProcdefName string `json:"procdefName" gorm:"not null;size:64;comment:流程定义名称"` // 流程定义名称
|
||||
|
||||
BizType string `json:"bizType"` // 业务类型
|
||||
BizKey string `json:"bizKey"` // 业务key
|
||||
BizForm string `json:"bizForm"` // 业务表单
|
||||
BizStatus ProcinstBizStatus `json:"bizStatus"` // 业务状态
|
||||
BizHandleRes string `json:"bizHandleRes"` // 业务处理结果
|
||||
TaskKey string `json:"taskKey"` // 当前任务key
|
||||
Status ProcinstStatus `json:"status"` // 状态
|
||||
Remark string `json:"remark"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
Duration int64 `json:"duration"` // 持续时间(开始到结束)
|
||||
BizType string `json:"bizType" gorm:"not null;size:64;comment:关联业务类型"` // 业务类型
|
||||
BizKey string `json:"bizKey" gorm:"not null;size:64;comment:关联业务key"` // 业务key
|
||||
BizForm string `json:"bizForm" gorm:"type:text;comment:业务form"` // 业务表单
|
||||
BizStatus ProcinstBizStatus `json:"bizStatus" gorm:"comment:业务状态"` // 业务状态
|
||||
BizHandleRes string `json:"bizHandleRes" gorm:"size:4000;comment:关联的业务处理结果"` // 业务处理结果
|
||||
TaskKey string `json:"taskKey" gorm:"size:100;comment:当前任务key"` // 当前任务key
|
||||
Status ProcinstStatus `json:"status" gorm:"comment:状态"` // 状态
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
EndTime *time.Time `json:"endTime" gorm:"comment:结束时间"`
|
||||
Duration int64 `json:"duration" gorm:"comment:流程持续时间(开始到结束)"` // 持续时间(开始到结束)
|
||||
}
|
||||
|
||||
func (a *Procinst) TableName() string {
|
||||
@@ -68,15 +68,15 @@ const (
|
||||
type ProcinstTask struct {
|
||||
model.Model
|
||||
|
||||
ProcinstId uint64 `json:"procinstId"` // 流程实例id
|
||||
TaskKey string `json:"taskKey"` // 当前任务key
|
||||
TaskName string `json:"taskName"` // 当前任务名称
|
||||
Assignee string `json:"assignee"` // 分配到该任务的用户
|
||||
ProcinstId uint64 `json:"procinstId" gorm:"not null;index:idx_procinst_id;comment:流程实例id"` // 流程实例id
|
||||
TaskKey string `json:"taskKey" gorm:"not null;size:64;comment:任务key"` // 当前任务key
|
||||
TaskName string `json:"taskName" gorm:"size:64;comment:任务名称"` // 当前任务名称
|
||||
Assignee string `json:"assignee" gorm:"size:64;comment:分配到该任务的用户"` // 分配到该任务的用户
|
||||
|
||||
Status ProcinstTaskStatus `json:"status"` // 状态
|
||||
Remark string `json:"remark"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
Duration int64 `json:"duration"` // 持续时间(开始到结束)
|
||||
Status ProcinstTaskStatus `json:"status" ` // 状态
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
EndTime *time.Time `json:"endTime" gorm:"comment:结束时间"`
|
||||
Duration int64 `json:"duration" gorm:"comment:任务持续时间(开始到结束)"` // 持续时间(开始到结束)
|
||||
}
|
||||
|
||||
func (a *ProcinstTask) TableName() string {
|
||||
|
||||
@@ -8,15 +8,15 @@ type Machine struct {
|
||||
model.Model
|
||||
model.ExtraData
|
||||
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Protocol int `json:"protocol"` // 连接协议 1.ssh 2.rdp
|
||||
Ip string `json:"ip"` // IP地址
|
||||
Port int `json:"port"` // 端口号
|
||||
Status int8 `json:"status"` // 状态 1:启用;2:停用
|
||||
Remark string `json:"remark"` // 备注
|
||||
SshTunnelMachineId int `json:"sshTunnelMachineId"` // ssh隧道机器id
|
||||
EnableRecorder int8 `json:"enableRecorder"` // 是否启用终端回放记录
|
||||
Code string `json:"code" gorm:"size:32;comment:code"` // code
|
||||
Name string `json:"name" gorm:"size:32"` // 名称
|
||||
Protocol int `json:"protocol" gorm:"default:1;comment:连接协议 1.ssh 2.rdp"` // 连接协议 1.ssh 2.rdp
|
||||
Ip string `json:"ip" gorm:"not null;size:100;comment:IP地址"` // IP地址
|
||||
Port int `json:"port" gorm:"not null;comment:端口号"` // 端口号
|
||||
Status int8 `json:"status" gorm:"not null;default:1;comment:状态 1:启用;2:停用"` // 状态 1:启用;2:停用
|
||||
Remark string `json:"remark" gorm:"comment:备注"` // 备注
|
||||
SshTunnelMachineId int `json:"sshTunnelMachineId" gorm:"comment:ssh隧道机器id"` // ssh隧道机器id
|
||||
EnableRecorder int8 `json:"enableRecorder" gorm:"comment:是否启用终端回放记录"` // 是否启用终端回放记录
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
// 机器命令过滤配置
|
||||
// MachineCmdConf 机器命令过滤配置
|
||||
type MachineCmdConf struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name"`
|
||||
Cmds model.Slice[string] `json:"cmds"` // 命令配置
|
||||
Status int8 `json:"execCmds"` // 状态
|
||||
Stratege string `json:"stratege"` // 策略,空禁用
|
||||
Remark string `json:"remark"` // 备注
|
||||
Name string `json:"name" gorm:"size:100;comment:名称"` // 名称
|
||||
Cmds model.Slice[string] `json:"cmds" gorm:"type:varchar(500);comment:命令配置"` // 命令配置
|
||||
Status int8 `json:"status" gorm:"comment:状态"` // 状态
|
||||
Stratege string `json:"stratege" gorm:"size:100;comment:策略"` // 策略,空禁用
|
||||
Remark string `json:"remark" gorm:"size:50;comment:备注"` // 备注
|
||||
}
|
||||
|
||||
@@ -9,24 +9,24 @@ import (
|
||||
type MachineCronJob struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name" form:"name"`
|
||||
Key string `json:"key"`
|
||||
Cron string `json:"cron"` // cron表达式
|
||||
Script string `json:"script"` // 任务内容
|
||||
Status int `json:"status" form:"status"`
|
||||
Remark string `json:"remark"` // 备注
|
||||
LastExecTime *time.Time `json:"lastExecTime"`
|
||||
SaveExecResType int `json:"saveExecResType"` // 记录执行结果类型
|
||||
Name string `json:"name" form:"name" gorm:"not null;size:255;comment:名称"` // 名称
|
||||
Key string `json:"key" gorm:"not null;size:32;comment:key"` // key
|
||||
Cron string `json:"cron" gorm:"not null;size:255;comment:cron表达式"` // cron表达式
|
||||
Script string `json:"script" gorm:"type:text;comment:脚本内容"` // 任务内容
|
||||
Status int `json:"status" form:"status" gorm:"comment:状态"` // 状态
|
||||
Remark string `json:"remark" gorm:"size:255;comment:备注"` // 备注
|
||||
LastExecTime *time.Time `json:"lastExecTime" gorm:"comment:最后执行时间"` // 最后执行时间
|
||||
SaveExecResType int `json:"saveExecResType" gorm:"comment:保存执行记录类型"` // 记录执行结果类型
|
||||
}
|
||||
|
||||
// 机器任务执行记录
|
||||
// MachineCronJobExec 机器任务执行记录
|
||||
type MachineCronJobExec struct {
|
||||
model.DeletedModel
|
||||
|
||||
CronJobId uint64 `json:"cronJobId" form:"cronJobId"`
|
||||
MachineCode string `json:"machineCode" form:"machineCode"`
|
||||
Status int `json:"status" form:"status"` // 执行状态
|
||||
Res string `json:"res"` // 执行结果
|
||||
CronJobId uint64 `json:"cronJobId" form:"cronJobId" gorm:"not null;"`
|
||||
MachineCode string `json:"machineCode" form:"machineCode" gorm:"size:50;"`
|
||||
Status int `json:"status" form:"status"` // 执行状态
|
||||
Res string `json:"res" gorm:"size:4000;"` // 执行结果
|
||||
ExecTime time.Time `json:"execTime"`
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,8 @@ import "mayfly-go/pkg/model"
|
||||
type MachineFile struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name"`
|
||||
// 机器id
|
||||
MachineId uint64 `json:"machineId"`
|
||||
Type int `json:"type"`
|
||||
// 路径
|
||||
Path string `json:"path"`
|
||||
Name string `json:"name" gorm:"not null;size:50;comment:机器文件配置(linux一切皆文件,故也可以表示目录)"` // 机器文件配置(linux一切皆文件,故也可以表示目录)
|
||||
MachineId uint64 `json:"machineId" gorm:"not null;comment:机器id"` // 机器id
|
||||
Type string `json:"type" gorm:"not null;size:32;comment:1:目录;2:文件"` // 1:目录;2:文件
|
||||
Path string `json:"path" gorm:"not null;size:150;comment:路径"` // 路径
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@ import "mayfly-go/pkg/model"
|
||||
|
||||
type MachineScript struct {
|
||||
model.Model
|
||||
Name string `json:"name"`
|
||||
MachineId uint64 `json:"machineId"` // 机器id
|
||||
Type int `json:"type"`
|
||||
Description string `json:"description"` // 脚本描述
|
||||
Params string `json:"params"` // 参数列表json
|
||||
Script string `json:"script" gorm:"column:script;type:text"` // 脚本内容
|
||||
|
||||
Name string `json:"name" gorm:"not null;size:255;comment:脚本名"` // 脚本名
|
||||
MachineId uint64 `json:"machineId" gorm:"not null;comment:机器id[0:公共]"` // 机器id
|
||||
Type int `json:"type" gorm:"comment:脚本类型[1: 有结果;2:无结果;3:实时交互]"` // 脚本类型[1: 有结果;2:无结果;3:实时交互]
|
||||
Description string `json:"description" gorm:"size:255;comment:脚本描述"` // 脚本描述
|
||||
Params string `json:"params" gorm:"size:500;comment:脚本入参"` // 参数列表json
|
||||
Script string `json:"script" gorm:"type:text;comment:脚本内容"` // 脚本内容
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
type MachineTermOp struct {
|
||||
model.DeletedModel
|
||||
|
||||
MachineId uint64 `json:"machineId"`
|
||||
Username string `json:"username"`
|
||||
FileKey string `json:"fileKey"` // 文件key
|
||||
ExecCmds string `json:"execCmds"` // 执行的命令
|
||||
MachineId uint64 `json:"machineId" gorm:"not null;comment:机器id"` // 机器id
|
||||
Username string `json:"username" gorm:"size:60;comment:登录用户名"` // 登录用户名
|
||||
FileKey string `json:"fileKey" gorm:"size:36;comment:文件"` // 文件key
|
||||
ExecCmds string `json:"execCmds" gorm:"type:text;comment:执行的命令记录"` // 执行的命令
|
||||
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
CreatorId uint64 `json:"creatorId"`
|
||||
Creator string `json:"creator"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;comment:创建时间"` // 创建时间
|
||||
CreatorId uint64 `json:"creatorId" gorm:"comment:创建人ID"`
|
||||
Creator string `json:"creator" gorm:"size:50;comment:创建人"` // 创建人
|
||||
EndTime *time.Time `json:"endTime" gorm:"comment:结束时间"` // 结束时间
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
type Mongo struct {
|
||||
model.Model
|
||||
|
||||
Code string `orm:"column(code)" json:"code"`
|
||||
Name string `orm:"column(name)" json:"name"`
|
||||
Uri string `orm:"column(uri)" json:"uri"`
|
||||
SshTunnelMachineId int `orm:"column(ssh_tunnel_machine_id)" json:"sshTunnelMachineId"` // ssh隧道机器id
|
||||
Code string `json:"code" gorm:"size:32;comment:code"` // code
|
||||
Name string `json:"name" gorm:"not null;size:50;comment:名称"` // 名称
|
||||
Uri string `json:"uri" gorm:"not null;size:255;comment:连接uri"` // 连接uri
|
||||
SshTunnelMachineId int `json:"sshTunnelMachineId" gorm:"comment:ssh隧道的机器id"` // ssh隧道机器id
|
||||
}
|
||||
|
||||
// 转换为mongoInfo进行连接
|
||||
|
||||
@@ -10,11 +10,11 @@ type Msg struct {
|
||||
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
CreatorId uint64 `json:"creatorId"`
|
||||
Creator string `json:"creator"`
|
||||
Creator string `json:"creator" gorm:"size:50"`
|
||||
|
||||
Type int `json:"type"`
|
||||
Msg string `json:"msg"`
|
||||
RecipientId int64 `json:"recipientId"` // 接受者id
|
||||
Type int8 `json:"type"`
|
||||
Msg string `json:"msg" gorm:"size:2000"`
|
||||
RecipientId int64 `json:"recipientId"` // 接收人id,-1为所有接收
|
||||
}
|
||||
|
||||
func (a *Msg) TableName() string {
|
||||
|
||||
@@ -12,13 +12,13 @@ import (
|
||||
type Redis struct {
|
||||
model.Model
|
||||
|
||||
Code string `orm:"column(code)" json:"code"`
|
||||
Name string `orm:"column(name)" json:"name"`
|
||||
Host string `orm:"column(host)" json:"host"`
|
||||
Mode string `json:"mode"`
|
||||
Db string `orm:"column(database)" json:"db"`
|
||||
SshTunnelMachineId int `orm:"column(ssh_tunnel_machine_id)" json:"sshTunnelMachineId"` // ssh隧道机器id
|
||||
Remark string
|
||||
Code string `json:"code" gorm:"size:32;not null;"` // code
|
||||
Name string `json:"name" gorm:"size:255;not null;"` // 名称
|
||||
Host string `json:"host" gorm:"size:255;not null;"` // 主机地址
|
||||
Mode string `json:"mode" gorm:"size:32;"` // 模式
|
||||
Db string `json:"db" gorm:"size:64;comment:库号: 多个库用,分割"` // 库号: 多个库用,分割
|
||||
SshTunnelMachineId int `json:"sshTunnelMachineId" gorm:"comment:ssh隧道的机器id"` // ssh隧道机器id
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
}
|
||||
|
||||
// ToRedisInfo 转换为redisInfo进行连接
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package form
|
||||
|
||||
type ResourceForm struct {
|
||||
Pid int `json:"pid"`
|
||||
Pid int64 `json:"pid"`
|
||||
Id int `json:"id"`
|
||||
Code string `json:"code" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
|
||||
@@ -11,13 +11,13 @@ import (
|
||||
type Account struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"-"`
|
||||
Status AccountStatus `json:"status"`
|
||||
Name string `json:"name" gorm:"size:30;not null;"`
|
||||
Username string `json:"username" gorm:"size:30;not null;"`
|
||||
Password string `json:"-" gorm:"size:64;not null;"`
|
||||
Status AccountStatus `json:"status" gorm:"not null;"`
|
||||
LastLoginTime *time.Time `json:"lastLoginTime"`
|
||||
LastLoginIp string `json:"lastLoginIp"`
|
||||
OtpSecret string `json:"-"`
|
||||
LastLoginIp string `json:"lastLoginIp" gorm:"size:50;"`
|
||||
OtpSecret string `json:"-" gorm:"size:100;"`
|
||||
}
|
||||
|
||||
func (a *Account) TableName() string {
|
||||
|
||||
@@ -13,12 +13,12 @@ const (
|
||||
|
||||
type Config struct {
|
||||
model.Model
|
||||
Name string `json:"name"` // 配置名
|
||||
Key string `json:"key"` // 配置key
|
||||
Params string `json:"params" gorm:"column:params;type:varchar(1500)"`
|
||||
Value string `json:"value" gorm:"column:value;type:varchar(1500)"`
|
||||
Remark string `json:"remark"`
|
||||
Permission string `json:"permission"` // 可操作该配置的权限
|
||||
Name string `json:"name" gorm:"size:60;not null;"` // 配置名
|
||||
Key string `json:"key" gorm:"size:60;not null;"` // 配置key
|
||||
Params string `json:"params" gorm:"size:1500"`
|
||||
Value string `json:"value" gorm:"size:1500"`
|
||||
Remark string `json:"remark" gorm:"size:255"`
|
||||
Permission string `json:"permission" gorm:"size:255;comment:操作权限"` // 可操作该配置的权限
|
||||
}
|
||||
|
||||
func (a *Config) TableName() string {
|
||||
|
||||
@@ -4,14 +4,14 @@ import "mayfly-go/pkg/model"
|
||||
|
||||
type Resource struct {
|
||||
model.Model
|
||||
Pid int `json:"pid"`
|
||||
UiPath string `json:"ui_path"` // 唯一标识路径
|
||||
Type int8 `json:"type"` // 1:菜单路由;2:资源(按钮等)
|
||||
Status int8 `json:"status"` // 1:可用;-1:不可用
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Pid int64 `json:"pid" gorm:"not null;comment:父节点id;"`
|
||||
UiPath string `json:"ui_path" gorm:"size:300;not null;comment:唯一标识路径;"` // 唯一标识路径
|
||||
Type int8 `json:"type" gorm:"not null;comment:1:菜单路由;2:资源(按钮等);"` // 1:菜单路由;2:资源(按钮等)
|
||||
Status int8 `json:"status" gorm:"not null;comment:状态;1:可用,-1:禁用;"` // 1:可用;-1:不可用
|
||||
Code string `json:"code" gorm:"size:300;comment:菜单路由为path,其他为唯一标识;"`
|
||||
Name string `json:"name" gorm:"size:255;not null;"`
|
||||
Weight int `json:"weight"`
|
||||
Meta string `json:"meta"`
|
||||
Meta string `json:"meta" gorm:"size:500;"`
|
||||
}
|
||||
|
||||
func (a *Resource) TableName() string {
|
||||
|
||||
@@ -12,11 +12,11 @@ const (
|
||||
|
||||
type Role struct {
|
||||
model.Model
|
||||
Status int `json:"status"` // 1:可用;-1:不可用
|
||||
Name string `json:"name"`
|
||||
Remark string `json:"remark"`
|
||||
Code string `json:"code"`
|
||||
Type int `json:"type"`
|
||||
Status int `json:"status" gorm:"not null;"` // 1:可用;-1:不可用
|
||||
Name string `json:"name" gorm:"size:32;not null;"`
|
||||
Remark string `json:"remark" gorm:"size:255;not null;"`
|
||||
Code string `json:"code" gorm:"size:64;not null;"`
|
||||
Type int8 `json:"type" gorm:"not null;comment:类型:1:公共角色;2:特殊角色;"`
|
||||
}
|
||||
|
||||
func (a *Role) TableName() string {
|
||||
@@ -27,11 +27,11 @@ func (a *Role) TableName() string {
|
||||
type RoleResource struct {
|
||||
model.DeletedModel
|
||||
|
||||
RoleId uint64 `json:"roleId"`
|
||||
ResourceId uint64 `json:"resourceId"`
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
CreatorId uint64 `json:"creatorId"`
|
||||
Creator string `json:"creator"`
|
||||
RoleId uint64 `json:"roleId" gorm:"not null;"`
|
||||
ResourceId uint64 `json:"resourceId" gorm:"not null;"`
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;"`
|
||||
CreatorId uint64 `json:"creatorId" gorm:"not null;"`
|
||||
Creator string `json:"creator" gorm:"size:32;not null;"`
|
||||
}
|
||||
|
||||
func (a *RoleResource) TableName() string {
|
||||
@@ -42,11 +42,11 @@ func (a *RoleResource) TableName() string {
|
||||
type AccountRole struct {
|
||||
model.DeletedModel
|
||||
|
||||
AccountId uint64 `json:"accountId"`
|
||||
RoleId uint64 `json:"roleId"`
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
CreatorId uint64 `json:"creatorId"`
|
||||
Creator string `json:"creator"`
|
||||
AccountId uint64 `json:"accountId" gorm:"not null;"`
|
||||
RoleId uint64 `json:"roleId" gorm:"not null;"`
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;"`
|
||||
CreatorId uint64 `json:"creatorId" gorm:"not null;"`
|
||||
Creator string `json:"creator" gorm:"size:32;not null;"`
|
||||
}
|
||||
|
||||
func (a *AccountRole) TableName() string {
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
type SysLog struct {
|
||||
model.CreateModel
|
||||
|
||||
Type int8 `json:"type"`
|
||||
Description string `json:"description"`
|
||||
ReqParam string `json:"reqParam" gorm:"column:req_param;type:varchar(1000)"` // 请求参数
|
||||
Resp string `json:"resp" gorm:"column:resp;type:varchar(10000)"` // 响应结构
|
||||
Extra string `json:"extra"` // 日志额外信息
|
||||
Type int8 `json:"type" gorm:"not null;"`
|
||||
Description string `json:"description" gorm:"size:255;"`
|
||||
ReqParam string `json:"reqParam" gorm:"size:2000"` // 请求参数
|
||||
Resp string `json:"resp" gorm:"type:text;"` // 响应结构
|
||||
Extra string `json:"extra" gorm:"type:text;"` // 日志额外信息
|
||||
}
|
||||
|
||||
func (a *SysLog) TableName() string {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
// 授权凭证
|
||||
type AuthCertForm struct {
|
||||
Id uint64 `json:"id"`
|
||||
Name string `json:"name" binding:"required"` // 名称
|
||||
Name string `json:"name"` // 名称
|
||||
ResourceCode string `json:"resourceCode"` // 资源编号
|
||||
ResourceType int8 `json:"resourceType"` // 资源类型
|
||||
Username string `json:"username"` // 用户名
|
||||
|
||||
@@ -96,7 +96,7 @@ func (r *resourceAuthCertAppImpl) RelateAuthCert(ctx context.Context, params *dt
|
||||
|
||||
// 密文加密
|
||||
if err := resourceAuthCert.CiphertextEncrypt(); err != nil {
|
||||
return errorx.NewBiz(err.Error())
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,9 +309,14 @@ func (r *resourceAuthCertAppImpl) FillAuthCert(resourceType int8, resources ...e
|
||||
|
||||
// addAuthCert 添加授权凭证
|
||||
func (r *resourceAuthCertAppImpl) addAuthCert(ctx context.Context, rac *entity.ResourceAuthCert) error {
|
||||
if r.CountByCond(&entity.ResourceAuthCert{Name: rac.Name}) > 0 {
|
||||
return errorx.NewBizI(ctx, imsg.ErrAcNameExist, "acName", rac.Name)
|
||||
if rac.Name == "" {
|
||||
rac.Name = stringx.Rand(10)
|
||||
} else {
|
||||
if r.CountByCond(&entity.ResourceAuthCert{Name: rac.Name}) > 0 {
|
||||
return errorx.NewBizI(ctx, imsg.ErrAcNameExist, "acName", rac.Name)
|
||||
}
|
||||
}
|
||||
|
||||
// 公共凭证
|
||||
if rac.Type == entity.AuthCertTypePublic {
|
||||
rac.ResourceCode = "-"
|
||||
|
||||
@@ -15,15 +15,15 @@ type ResourceAuthCert struct {
|
||||
model.Model
|
||||
model.ExtraData
|
||||
|
||||
Name string `json:"name"` // 名称(全局唯一)
|
||||
Name string `json:"name" gorm:"size:50;comment:账号名称"` // 名称(全局唯一)
|
||||
|
||||
ResourceCode string `json:"resourceCode"` // 资源编号
|
||||
ResourceType int8 `json:"resourceType"` // 资源类型
|
||||
Type AuthCertType `json:"type"` // 凭证类型
|
||||
Username string `json:"username"` // 用户名
|
||||
Ciphertext string `json:"ciphertext"` // 密文
|
||||
CiphertextType AuthCertCiphertextType `json:"ciphertextType"` // 密文类型
|
||||
Remark string `json:"remark"` // 备注
|
||||
ResourceCode string `json:"resourceCode" gorm:"size:36;comment:资源编码"` // 资源编号
|
||||
ResourceType int8 `json:"resourceType" gorm:"not null;comment:资源类型"` // 资源类型
|
||||
Type AuthCertType `json:"type" gorm:"comment:凭证类型"` // 凭证类型
|
||||
Username string `json:"username" gorm:"size:100;comment:用户名"` // 用户名
|
||||
Ciphertext string `json:"ciphertext" gorm:"size:5000;comment:密文内容"` // 密文
|
||||
CiphertextType AuthCertCiphertextType `json:"ciphertextType" gorm:"not null;comment:密文类型(-1.公共授权凭证 1.密码 2.秘钥)"` // 密文类型
|
||||
Remark string `json:"remark" gorm:"size:255;comment:备注"` // 备注
|
||||
}
|
||||
|
||||
// CiphertextEncrypt 密文加密
|
||||
|
||||
@@ -6,7 +6,7 @@ import "mayfly-go/pkg/model"
|
||||
type ResourceOpLog struct {
|
||||
model.CreateModel
|
||||
|
||||
CodePath string `json:"codePath"` // 标签路径
|
||||
ResourceCode string `json:"resourceCode"` // 资源编号
|
||||
ResourceType int8 `json:"relateType"` // 资源类型
|
||||
CodePath string `json:"codePath" gorm:"size:255;not null;"` // 标签路径
|
||||
ResourceCode string `json:"resourceCode" gorm:"size:50;not null;"` // 资源编号
|
||||
ResourceType int8 `json:"relateType" gorm:"not null;"` // 资源类型
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ import (
|
||||
type TagTree struct {
|
||||
model.Model
|
||||
|
||||
Type TagType `json:"type"` // 类型: -1.普通标签; 其他值则为对应的资源类型
|
||||
Code string `json:"code"` // 标识编码, 若类型不为-1,则为对应资源编码
|
||||
CodePath string `json:"codePath"` // 标识路径,tag1/tag2/tagType1|tagCode/tagType2|yyycode/,非普通标签类型段含有标签类型
|
||||
Name string `json:"name"` // 名称
|
||||
Remark string `json:"remark"` // 备注说明
|
||||
Type TagType `json:"type" gorm:"not null;default:-1;comment:类型: -1.普通标签; 1机器 2db 3redis 4mongo"` // 类型: -1.普通标签; 其他值则为对应的资源类型
|
||||
Code string `json:"code" gorm:"not null;size:50;comment:标识符"` // 标识编码, 若类型不为-1,则为对应资源编码
|
||||
CodePath string `json:"codePath" gorm:"not null;size:800;comment:标识符路径"` // 标识路径,tag1/tag2/tagType1|tagCode/tagType2|yyycode/,非普通标签类型段含有标签类型
|
||||
Name string `json:"name" gorm:"size:50;comment:名称"` // 名称
|
||||
Remark string `json:"remark" gorm:"size:255;"` // 备注说明
|
||||
}
|
||||
|
||||
type TagType int8
|
||||
|
||||
@@ -6,9 +6,9 @@ import "mayfly-go/pkg/model"
|
||||
type TagTreeRelate struct {
|
||||
model.Model
|
||||
|
||||
TagId uint64 `json:"tagId"`
|
||||
RelateId uint64 `json:"relateId"` // 关联的id
|
||||
RelateType TagRelateType `json:"relateType"` // 关联的类型
|
||||
TagId uint64 `json:"tagId" gorm:"not null;index:idx_tag_id;comment:标签树id"` // 标签树id
|
||||
RelateId uint64 `json:"relateId" gorm:"not null;comment:关联的资源id"` // 关联的资源id
|
||||
RelateType TagRelateType `json:"relateType" gorm:"not null;comment:关联类型"` // 关联的类型
|
||||
}
|
||||
|
||||
type TagRelateType int8
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
type Team struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name"` // 名称
|
||||
ValidityStartDate *model.JsonTime `json:"validityStartDate"` // 生效开始时间
|
||||
ValidityEndDate *model.JsonTime `json:"validityEndDate"` // 生效结束时间
|
||||
Remark string `json:"remark"` // 备注说明
|
||||
Name string `json:"name" gorm:"not null;size:36;comment:名称"` // 名称
|
||||
ValidityStartDate *model.JsonTime `json:"validityStartDate" gorm:"comment:生效开始时间"` // 生效开始时间
|
||||
ValidityEndDate *model.JsonTime `json:"validityEndDate" gorm:"comment:生效结束时间"` // 生效结束时间
|
||||
Remark string `json:"remark" gorm:"size:255;"` // 备注说明
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import "mayfly-go/pkg/model"
|
||||
type TeamMember struct {
|
||||
model.Model
|
||||
|
||||
TeamId uint64 `json:"teamId"`
|
||||
AccountId uint64 `json:"accountId"`
|
||||
Username string `json:"username"`
|
||||
TeamId uint64 `json:"teamId" gorm:"not null;"`
|
||||
AccountId uint64 `json:"accountId" gorm:"not null;"`
|
||||
Username string `json:"username" gorm:"size:50;not null;"`
|
||||
}
|
||||
|
||||
53
server/migration/migration.go
Normal file
53
server/migration/migration.go
Normal file
@@ -0,0 +1,53 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"mayfly-go/migration/migrations"
|
||||
"mayfly-go/pkg/logx"
|
||||
"mayfly-go/pkg/rediscli"
|
||||
"time"
|
||||
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// RunMigrations 数据库迁移操作
|
||||
func RunMigrations(db *gorm.DB) error {
|
||||
logx.Info("start to run migrations")
|
||||
// 添加分布式锁, 防止多个服务同时执行迁移
|
||||
lock := rediscli.NewLock("mayfly:db:migrations", 1*time.Minute)
|
||||
if lock != nil {
|
||||
if !lock.Lock() {
|
||||
return nil
|
||||
}
|
||||
defer lock.UnLock()
|
||||
}
|
||||
|
||||
err := run(db,
|
||||
migrations.Init,
|
||||
migrations.V1_9,
|
||||
)
|
||||
|
||||
if err == nil {
|
||||
logx.Info("migrations run success")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func run(db *gorm.DB, fs ...func() []*gormigrate.Migration) error {
|
||||
var ms []*gormigrate.Migration
|
||||
for _, f := range fs {
|
||||
ms = append(ms, f()...)
|
||||
}
|
||||
|
||||
m := gormigrate.New(db, &gormigrate.Options{
|
||||
TableName: "migrations",
|
||||
IDColumnName: "id",
|
||||
IDColumnSize: 300,
|
||||
UseTransaction: true,
|
||||
ValidateUnknownMigrations: true,
|
||||
}, ms)
|
||||
if err := m.Migrate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
1447
server/migration/migrations/init.go
Normal file
1447
server/migration/migrations/init.go
Normal file
File diff suppressed because it is too large
Load Diff
42
server/migration/migrations/v1_9.go
Normal file
42
server/migration/migrations/v1_9.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
machineentity "mayfly-go/internal/machine/domain/entity"
|
||||
sysentity "mayfly-go/internal/sys/domain/entity"
|
||||
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func V1_9() []*gormigrate.Migration {
|
||||
var migrations []*gormigrate.Migration
|
||||
migrations = append(migrations, V1_9_3()...)
|
||||
return migrations
|
||||
}
|
||||
|
||||
func V1_9_3() []*gormigrate.Migration {
|
||||
return []*gormigrate.Migration{
|
||||
{
|
||||
ID: "20250213-v1.9.3-addMachineExtra-updateMenuIcon",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
tx.Migrator().AddColumn(&machineentity.Machine{}, "extra")
|
||||
|
||||
// 更新菜单图标
|
||||
resourceModel := &sysentity.Resource{}
|
||||
tx.Model(resourceModel).Where("id = ?", 11).Update("meta", `{"component":"system/role/RoleList","icon":"icon menu/role","isKeepAlive":true,"routeName":"RoleList"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 14).Update("meta", `{"component":"system/account/AccountList","icon":"User","isKeepAlive":true,"routeName":"AccountList"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 150).Update("meta", `{"component":"ops/db/SyncTaskList","icon":"Refresh","isKeepAlive":true,"routeName":"SyncTaskList"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 60).Update("meta", `{"icon":"icon redis/redis","isKeepAlive":true,"routeName":"RDS"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 61).Update("meta", `{"component":"ops/redis/DataOperation","icon":"icon redis/redis","isKeepAlive":true,"routeName":"DataOperation"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 63).Update("meta", `{"component":"ops/redis/RedisList","icon":"icon redis/redis","isKeepAlive":true,"routeName":"RedisList"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 79).Update("meta", `{"icon":"icon mongo/mongo","isKeepAlive":true,"routeName":"Mongo"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 80).Update("meta", `{"component":"ops/mongo/MongoDataOp","icon":"icon mongo/mongo","isKeepAlive":true,"routeName":"MongoDataOp"}`)
|
||||
tx.Model(resourceModel).Where("id = ?", 82).Update("meta", `{"component":"ops/mongo/MongoList","icon":"icon mongo/mongo","isKeepAlive":true,"routeName":"MongoList"}`)
|
||||
return nil
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return nil
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
entity2 "mayfly-go/internal/db/domain/entity"
|
||||
"mayfly-go/internal/machine/domain/entity"
|
||||
entity3 "mayfly-go/internal/mongo/domain/entity"
|
||||
entity6 "mayfly-go/internal/msg/domain/entity"
|
||||
entity4 "mayfly-go/internal/redis/domain/entity"
|
||||
entity5 "mayfly-go/internal/sys/domain/entity"
|
||||
entity7 "mayfly-go/internal/tag/domain/entity"
|
||||
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// T2022 TODO 在此之前的数据库表结构初始化, 目前先使用mayfly-go.sql文件初始化数据库结构
|
||||
func T2022() *gormigrate.Migration {
|
||||
return &gormigrate.Migration{
|
||||
ID: "2022",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
if err := tx.AutoMigrate(&entity.Machine{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity.MachineFile{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity.MachineMonitor{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity.MachineScript{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity.MachineCronJob{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity.MachineCronJobExec{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.AutoMigrate(&entity2.DbInstance{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity2.Db{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity2.DbSql{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity2.DbSqlExec{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.AutoMigrate(&entity3.Mongo{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.AutoMigrate(&entity4.Redis{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.AutoMigrate(&entity5.Account{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity5.AccountRole{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity5.Config{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity5.SysLog{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity5.Resource{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity5.Role{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity5.RoleResource{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.AutoMigrate(&entity6.Msg{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity7.TagTree{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity7.Team{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.AutoMigrate(&entity7.TeamMember{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
authentity "mayfly-go/internal/auth/domain/entity"
|
||||
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// T20230720 三方登录表
|
||||
func T20230720() *gormigrate.Migration {
|
||||
return &gormigrate.Migration{
|
||||
ID: "20230720",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
return tx.AutoMigrate(&authentity.Oauth2Account{})
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
"mayfly-go/internal/db/domain/entity"
|
||||
)
|
||||
|
||||
func T20231125() *gormigrate.Migration {
|
||||
return &gormigrate.Migration{
|
||||
ID: "20231115",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
entities := [...]any{
|
||||
new(entity.DbBackup),
|
||||
new(entity.DbBackupHistory),
|
||||
new(entity.DbRestore),
|
||||
new(entity.DbRestoreHistory),
|
||||
new(entity.DbBinlog),
|
||||
new(entity.DbBinlogHistory),
|
||||
}
|
||||
for _, e := range entities {
|
||||
if err := tx.AutoMigrate(e); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/sys/domain/entity"
|
||||
"mayfly-go/pkg/config"
|
||||
"mayfly-go/pkg/model"
|
||||
"mayfly-go/pkg/rediscli"
|
||||
"time"
|
||||
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// RunMigrations 数据库迁移操作
|
||||
func RunMigrations(db *gorm.DB) error {
|
||||
// 添加分布式锁, 防止多个服务同时执行迁移
|
||||
lock := rediscli.NewLock("mayfly:db:migrations", 1*time.Minute)
|
||||
if lock != nil {
|
||||
if !lock.Lock() {
|
||||
return nil
|
||||
}
|
||||
defer lock.UnLock()
|
||||
}
|
||||
|
||||
if !config.Conf.Mysql.AutoMigration {
|
||||
return nil
|
||||
}
|
||||
|
||||
return run(db,
|
||||
// T2022,
|
||||
// T20230720,
|
||||
T20231125,
|
||||
)
|
||||
}
|
||||
|
||||
func run(db *gorm.DB, fs ...func() *gormigrate.Migration) error {
|
||||
var ms []*gormigrate.Migration
|
||||
for _, f := range fs {
|
||||
ms = append(ms, f())
|
||||
}
|
||||
m := gormigrate.New(db, &gormigrate.Options{
|
||||
TableName: "migrations",
|
||||
IDColumnName: "id",
|
||||
IDColumnSize: 200,
|
||||
UseTransaction: true,
|
||||
ValidateUnknownMigrations: true,
|
||||
}, ms)
|
||||
if err := m.Migrate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func insertResource(tx *gorm.DB, res *entity.Resource) error {
|
||||
now := time.Now()
|
||||
res.CreateTime = &now
|
||||
res.CreatorId = 1
|
||||
res.Creator = "admin"
|
||||
res.UpdateTime = &now
|
||||
res.ModifierId = 1
|
||||
res.Modifier = "admin"
|
||||
if err := tx.Save(res).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return tx.Save(&entity.RoleResource{
|
||||
DeletedModel: model.DeletedModel{},
|
||||
RoleId: 1,
|
||||
ResourceId: res.Id,
|
||||
CreateTime: &now,
|
||||
CreatorId: 1,
|
||||
Creator: "admin",
|
||||
}).Error
|
||||
}
|
||||
@@ -3,16 +3,15 @@ package config
|
||||
import "mayfly-go/pkg/logx"
|
||||
|
||||
type Mysql struct {
|
||||
AutoMigration bool `mapstructure:"auto-migration" json:"autoMigration" yaml:"auto-migration"`
|
||||
Host string `mapstructure:"path" json:"host" yaml:"host"`
|
||||
Config string `mapstructure:"config" json:"config" yaml:"config"`
|
||||
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
|
||||
Username string `mapstructure:"username" json:"username" yaml:"username"`
|
||||
Password string `mapstructure:"password" json:"password" yaml:"password"`
|
||||
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
|
||||
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
|
||||
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
|
||||
LogZap string `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"`
|
||||
Host string `mapstructure:"path" json:"host" yaml:"host"`
|
||||
Config string `mapstructure:"config" json:"config" yaml:"config"`
|
||||
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
|
||||
Username string `mapstructure:"username" json:"username" yaml:"username"`
|
||||
Password string `mapstructure:"password" json:"password" yaml:"password"`
|
||||
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
|
||||
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
|
||||
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
|
||||
LogZap string `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"`
|
||||
}
|
||||
|
||||
func (m *Mysql) Default() {
|
||||
|
||||
@@ -43,7 +43,7 @@ type ModelI interface {
|
||||
}
|
||||
|
||||
type IdModel struct {
|
||||
Id uint64 `json:"id"`
|
||||
Id uint64 `json:"id" gorm:"primarykey;AUTO_INCREMENT"`
|
||||
}
|
||||
|
||||
func (m *IdModel) SetId(id uint64) {
|
||||
@@ -69,7 +69,7 @@ func (m *IdModel) LogicDelete() bool {
|
||||
// 含有删除字段模型
|
||||
type DeletedModel struct {
|
||||
IdModel
|
||||
IsDeleted int8 `json:"-" gorm:"column:is_deleted;default:0"`
|
||||
IsDeleted int8 `json:"-" gorm:"column:is_deleted;not null;default:0;"`
|
||||
DeleteTime *time.Time `json:"-"`
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@ func (m *DeletedModel) LogicDelete() bool {
|
||||
// CreateModelNLD 含有创建等信息,但不包含逻辑删除信息
|
||||
type CreateModelNLD struct {
|
||||
IdModel
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
CreatorId uint64 `json:"creatorId"`
|
||||
Creator string `json:"creator"`
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;"`
|
||||
CreatorId uint64 `json:"creatorId" gorm:"not null;"`
|
||||
Creator string `json:"creator" gorm:"size:32;not null;"`
|
||||
}
|
||||
|
||||
func (m *CreateModelNLD) FillBaseInfo(idGenType IdGenType, account *LoginAccount) {
|
||||
@@ -109,9 +109,9 @@ func (m *CreateModelNLD) FillBaseInfo(idGenType IdGenType, account *LoginAccount
|
||||
// 含有删除、创建字段模型
|
||||
type CreateModel struct {
|
||||
DeletedModel
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
CreatorId uint64 `json:"creatorId"`
|
||||
Creator string `json:"creator"`
|
||||
CreateTime *time.Time `json:"createTime" gorm:"not null;"`
|
||||
CreatorId uint64 `json:"creatorId" gorm:"not null;"`
|
||||
Creator string `json:"creator" gorm:"size:32;not null;"`
|
||||
}
|
||||
|
||||
func (m *CreateModel) FillBaseInfo(idGenType IdGenType, account *LoginAccount) {
|
||||
@@ -132,9 +132,9 @@ func (m *CreateModel) FillBaseInfo(idGenType IdGenType, account *LoginAccount) {
|
||||
type ModelNLD struct {
|
||||
CreateModelNLD
|
||||
|
||||
UpdateTime *time.Time `json:"updateTime"`
|
||||
ModifierId uint64 `json:"modifierId"`
|
||||
Modifier string `json:"modifier"`
|
||||
UpdateTime *time.Time `json:"updateTime" gorm:"not null;"`
|
||||
ModifierId uint64 `json:"modifierId" gorm:"not null;"`
|
||||
Modifier string `json:"modifier" gorm:"size:32;not null;"`
|
||||
}
|
||||
|
||||
// 设置基础信息. 如创建时间,修改时间,创建者,修改者信息
|
||||
@@ -164,9 +164,9 @@ func (m *ModelNLD) FillBaseInfo(idGenType IdGenType, account *LoginAccount) {
|
||||
type Model struct {
|
||||
CreateModel
|
||||
|
||||
UpdateTime *time.Time `json:"updateTime"`
|
||||
ModifierId uint64 `json:"modifierId"`
|
||||
Modifier string `json:"modifier"`
|
||||
UpdateTime *time.Time `json:"updateTime" gorm:"not null;"`
|
||||
ModifierId uint64 `json:"modifierId" gorm:"not null;"`
|
||||
Modifier string `json:"modifier" gorm:"size:32;not null;"`
|
||||
}
|
||||
|
||||
// 设置基础信息. 如创建时间,修改时间,创建者,修改者信息
|
||||
@@ -223,7 +223,7 @@ func (s Slice[T]) Value() (driver.Value, error) {
|
||||
|
||||
// 带有额外其他信息字段的结构体
|
||||
type ExtraData struct {
|
||||
Extra Map[string, any] `json:"extra"`
|
||||
Extra Map[string, any] `json:"extra" gorm:"type:varchar(1000)"`
|
||||
}
|
||||
|
||||
// SetExtraValue 设置额外信息字段值
|
||||
|
||||
@@ -3,7 +3,7 @@ package starter
|
||||
import (
|
||||
"context"
|
||||
"mayfly-go/initialize"
|
||||
"mayfly-go/migrations"
|
||||
"mayfly-go/migration"
|
||||
"mayfly-go/pkg/config"
|
||||
"mayfly-go/pkg/global"
|
||||
"mayfly-go/pkg/logx"
|
||||
@@ -37,8 +37,8 @@ func RunWebServer() {
|
||||
initRedis()
|
||||
|
||||
// 数据库升级操作
|
||||
if err := migrations.RunMigrations(global.Db); err != nil {
|
||||
logx.Panicf("数据库升级失败: %v", err)
|
||||
if err := migration.RunMigrations(global.Db); err != nil {
|
||||
logx.Panicf("db migration failed: %v", err)
|
||||
}
|
||||
|
||||
// 参数校验器初始化、如错误提示中文转译等
|
||||
|
||||
Binary file not shown.
@@ -372,6 +372,7 @@ CREATE TABLE `t_machine` (
|
||||
`enable_recorder` tinyint(2) DEFAULT NULL COMMENT '是否启用终端回放记录',
|
||||
`status` tinyint(2) NOT NULL COMMENT '状态: 1:启用; -1:禁用',
|
||||
`remark` varchar(255) DEFAULT NULL,
|
||||
`extra` varchar(200) NULL comment '额外信息',
|
||||
`need_monitor` tinyint(2) DEFAULT NULL,
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator` varchar(16) DEFAULT NULL,
|
||||
@@ -786,16 +787,16 @@ INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`,
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(58, 135, 'dbms23ax/X0f4BxT0/AceXe321/', 2, 1, 'menu.dbBase', 'db', 1693041085, 'null', 1, 'admin', 1, 'admin', '2021-07-09 10:48:22', '2024-11-07 13:45:25', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(59, 38, 'dbms23ax/exaeca2x/ealcia23/', 2, 1, 'menu.dbDataOpBase', 'db:exec', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-07-09 10:50:13', '2024-11-07 13:43:31', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(60, 0, 'RedisXq4/', 1, 1, 'menu.redis', '/redis', 50000001, '{"icon":"icon redis/redis","isKeepAlive":true,"routeName":"RDS"}', 1, 'admin', 1, 'admin', '2021-07-19 20:15:41', '2024-11-07 13:57:51', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(61, 60, 'RedisXq4/Exitx4al/', 1, 1, 'menu.redisDataOp', 'data-operation', 10000000, '{"component":"ops/redis/DataOperation","icon":"iconfont icon-redis","isKeepAlive":true,"routeName":"DataOperation"}', 1, 'admin', 1, 'admin', '2021-07-19 20:17:29', '2024-11-07 13:58:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(61, 60, 'RedisXq4/Exitx4al/', 1, 1, 'menu.redisDataOp', 'data-operation', 10000000, '{"component":"ops/redis/DataOperation","icon":"icon icon-redis","isKeepAlive":true,"routeName":"DataOperation"}', 1, 'admin', 1, 'admin', '2021-07-19 20:17:29', '2024-11-07 13:58:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(62, 61, 'RedisXq4/Exitx4al/LSjie321/', 2, 1, 'menu.redisDataOpBase', 'redis:data', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-07-19 20:18:54', '2024-11-07 13:58:12', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(63, 60, 'RedisXq4/Eoaljc12/', 1, 1, 'menu.redisManage', 'manage', 20000000, '{"component":"ops/redis/RedisList","icon":"iconfont icon-redis","isKeepAlive":true,"routeName":"RedisList"}', 1, 'admin', 1, 'admin', '2021-07-20 10:48:04', '2024-11-07 13:58:52', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(63, 60, 'RedisXq4/Eoaljc12/', 1, 1, 'menu.redisManage', 'manage', 20000000, '{"component":"ops/redis/RedisList","icon":"icon icon-redis","isKeepAlive":true,"routeName":"RedisList"}', 1, 'admin', 1, 'admin', '2021-07-20 10:48:04', '2024-11-07 13:58:52', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(64, 63, 'RedisXq4/Eoaljc12/IoxqAd31/', 2, 1, 'menu.redisManageBase', 'redis:manage', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-07-20 10:48:26', '2024-11-07 13:59:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(71, 61, 'RedisXq4/Exitx4al/IUlxia23/', 2, 1, 'menu.redisDataOpSave', 'redis:data:save', 29999999, 'null', 1, 'admin', 1, 'admin', '2021-08-17 11:20:37', '2024-11-07 13:58:24', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(72, 3, '12sSjal1/lskeiql1/LIEwix43/', 2, 1, 'menu.machineKillprocess', 'machine:killprocess', 49999999, 'null', 1, 'admin', 1, 'admin', '2021-08-17 11:20:37', '2024-11-07 12:03:00', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(79, 0, 'Mongo452/', 1, 1, 'menu.mongo', '/mongo', 50000002, '{"icon":"icon mongo/mongo","isKeepAlive":true,"routeName":"Mongo"}', 1, 'admin', 1, 'admin', '2022-05-13 14:00:41', '2024-11-07 13:59:12', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(80, 79, 'Mongo452/eggago31/', 1, 1, 'menu.mongoDataOp', 'mongo-data-operation', 10000000, '{"component":"ops/mongo/MongoDataOp","icon":"iconfont icon-mongo","isKeepAlive":true,"routeName":"MongoDataOp"}', 1, 'admin', 1, 'admin', '2022-05-13 14:03:58', '2024-11-07 13:59:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(80, 79, 'Mongo452/eggago31/', 1, 1, 'menu.mongoDataOp', 'mongo-data-operation', 10000000, '{"component":"ops/mongo/MongoDataOp","icon":"icon icon-mongo","isKeepAlive":true,"routeName":"MongoDataOp"}', 1, 'admin', 1, 'admin', '2022-05-13 14:03:58', '2024-11-07 13:59:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(81, 80, 'Mongo452/eggago31/egjglal3/', 2, 1, 'menu.mongoDataOpBase', 'mongo:base', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-05-13 14:04:16', '2024-11-07 13:59:32', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(82, 79, 'Mongo452/ghxagl43/', 1, 1, 'menu.mongoManage', 'mongo-manage', 20000000, '{"component":"ops/mongo/MongoList","icon":"iconfont icon-mongo","isKeepAlive":true,"routeName":"MongoList"}', 1, 'admin', 1, 'admin', '2022-05-16 18:13:06', '2024-11-07 14:00:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(82, 79, 'Mongo452/ghxagl43/', 1, 1, 'menu.mongoManage', 'mongo-manage', 20000000, '{"component":"ops/mongo/MongoList","icon":"icon icon-mongo","isKeepAlive":true,"routeName":"MongoList"}', 1, 'admin', 1, 'admin', '2022-05-16 18:13:06', '2024-11-07 14:00:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(83, 82, 'Mongo452/ghxagl43/egljbla3/', 2, 1, 'menu.mongoManageBase', 'mongo:manage:base', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-05-16 18:13:25', '2024-11-07 14:00:35', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(84, 4, 'Xlqig32x/exlaeAlx/', 1, 1, 'menu.opLog', 'syslogs', 20000000, '{"component":"system/syslog/SyslogList","icon":"Tickets","routeName":"SyslogList"}', 1, 'admin', 1, 'admin', '2022-07-13 19:57:07', '2024-11-07 14:15:09', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(85, 84, 'Xlqig32x/exlaeAlx/3xlqeXql/', 2, 1, 'menu.opLogBase', 'syslog', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-07-13 19:57:55', '2024-11-07 14:15:19', 0, NULL);
|
||||
@@ -904,13 +905,6 @@ CREATE TABLE `t_sys_role_resource` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='角色资源关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of t_sys_role_resource
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `t_sys_role_resource` (role_id,resource_id,creator_id,creator,create_time,is_deleted,delete_time) VALUES
|
||||
(7,1,1,'admin','2021-07-06 15:07:09', 0, NULL);
|
||||
COMMIT;
|
||||
|
||||
DROP TABLE IF EXISTS `t_sys_file`;
|
||||
CREATE TABLE `t_sys_file` (
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
UPDATE `t_sys_config`
|
||||
SET
|
||||
`params` = '[{"name":"是否启用","model":"isUse","placeholder":"是否启用水印","options":"true,false"},{"name":"自定义信息","model":"content","placeholder":"额外添加的水印内容,可添加公司名称等"}]',
|
||||
`value` = '',
|
||||
`remark` = '水印信息配置',
|
||||
`key` = 'UseWatermark'
|
||||
WHERE
|
||||
`key` = 'UseWartermark';
|
||||
@@ -1,2 +0,0 @@
|
||||
-- 新增机器相关系统配置
|
||||
INSERT INTO `t_sys_config` (name, `key`, params, value, remark, permission, create_time, creator_id, creator, update_time, modifier_id, modifier, is_deleted, delete_time) VALUES('机器相关配置', 'MachineConfig', '[{"name":"终端回放存储路径","model":"terminalRecPath","placeholder":"终端回放存储路径"},{"name":"uploadMaxFileSize","model":"uploadMaxFileSize","placeholder":"允许上传的最大文件大小(1MB\\\\2GB等)"}]', '{"terminalRecPath":"./rec","uploadMaxFileSize":"1GB"}', '机器相关配置,如终端回放路径等', 'admin,', '2023-07-13 16:26:44', 1, 'admin', '2023-11-09 22:01:31', 1, 'admin', 0, NULL);
|
||||
@@ -1,194 +0,0 @@
|
||||
begin;
|
||||
|
||||
DROP TABLE IF EXISTS `t_tag_resource`;
|
||||
CREATE TABLE `t_tag_resource` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`tag_id` bigint NOT NULL,
|
||||
`tag_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '标签路径',
|
||||
`resource_code` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '资源编码',
|
||||
`resource_type` tinyint NOT NULL COMMENT '资源类型',
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator_id` bigint NOT NULL,
|
||||
`creator` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier_id` bigint NOT NULL,
|
||||
`modifier` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||
`is_deleted` tinyint DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_tag_path` (`tag_path`(100)) USING BTREE,
|
||||
KEY `idx_resource_code` (`resource_code`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='标签资源关联表';
|
||||
|
||||
ALTER TABLE t_machine ADD COLUMN code varchar(32) NULL AFTER id;
|
||||
CREATE INDEX idx_code USING BTREE ON t_machine (code);
|
||||
UPDATE t_machine SET code = id;
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_resource (`tag_id`,
|
||||
`tag_path`,
|
||||
`resource_code`,
|
||||
`resource_type`,
|
||||
`create_time`,
|
||||
`creator_id`,
|
||||
`creator`,
|
||||
`update_time`,
|
||||
`modifier_id`,
|
||||
`modifier`,
|
||||
`is_deleted`,
|
||||
`delete_time`)
|
||||
SELECT
|
||||
`tag_id`,
|
||||
`tag_path`,
|
||||
`code`,
|
||||
"1",
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
0,
|
||||
NULL
|
||||
FROM
|
||||
t_machine
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
|
||||
ALTER TABLE t_db ADD COLUMN code varchar(32) NULL AFTER id;
|
||||
CREATE INDEX idx_code USING BTREE ON t_db (code);
|
||||
UPDATE t_db SET code = id;
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_resource (`tag_id`,
|
||||
`tag_path`,
|
||||
`resource_code`,
|
||||
`resource_type`,
|
||||
`create_time`,
|
||||
`creator_id`,
|
||||
`creator`,
|
||||
`update_time`,
|
||||
`modifier_id`,
|
||||
`modifier`,
|
||||
`is_deleted`,
|
||||
`delete_time`)
|
||||
SELECT
|
||||
`tag_id`,
|
||||
`tag_path`,
|
||||
`code`,
|
||||
"2",
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
0,
|
||||
NULL
|
||||
FROM
|
||||
t_db
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
|
||||
ALTER TABLE t_redis ADD COLUMN code varchar(32) NULL AFTER id;
|
||||
CREATE INDEX idx_code USING BTREE ON t_redis (code);
|
||||
UPDATE t_redis SET code = id;
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_resource (`tag_id`,
|
||||
`tag_path`,
|
||||
`resource_code`,
|
||||
`resource_type`,
|
||||
`create_time`,
|
||||
`creator_id`,
|
||||
`creator`,
|
||||
`update_time`,
|
||||
`modifier_id`,
|
||||
`modifier`,
|
||||
`is_deleted`,
|
||||
`delete_time`)
|
||||
SELECT
|
||||
`tag_id`,
|
||||
`tag_path`,
|
||||
`code`,
|
||||
"3",
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
0,
|
||||
NULL
|
||||
FROM
|
||||
t_redis
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
|
||||
ALTER TABLE t_mongo ADD COLUMN code varchar(32) NULL AFTER id;
|
||||
CREATE INDEX idx_code USING BTREE ON t_mongo (code);
|
||||
UPDATE t_mongo SET code = id;
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_resource (`tag_id`,
|
||||
`tag_path`,
|
||||
`resource_code`,
|
||||
`resource_type`,
|
||||
`create_time`,
|
||||
`creator_id`,
|
||||
`creator`,
|
||||
`update_time`,
|
||||
`modifier_id`,
|
||||
`modifier`,
|
||||
`is_deleted`,
|
||||
`delete_time`)
|
||||
SELECT
|
||||
`tag_id`,
|
||||
`tag_path`,
|
||||
`code`,
|
||||
"4",
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
'2023-08-30 15:04:07',
|
||||
1,
|
||||
'admin',
|
||||
0,
|
||||
NULL
|
||||
FROM
|
||||
t_mongo
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
ALTER TABLE t_machine DROP COLUMN tag_id;
|
||||
ALTER TABLE t_machine DROP COLUMN tag_path;
|
||||
|
||||
ALTER TABLE t_db DROP COLUMN tag_id;
|
||||
ALTER TABLE t_db DROP COLUMN tag_path;
|
||||
|
||||
ALTER TABLE t_redis DROP COLUMN tag_id;
|
||||
ALTER TABLE t_redis DROP COLUMN tag_path;
|
||||
|
||||
ALTER TABLE t_mongo DROP COLUMN tag_id;
|
||||
ALTER TABLE t_mongo DROP COLUMN tag_path;
|
||||
|
||||
-- 机器终端操作记录表
|
||||
DROP TABLE IF EXISTS `t_machine_term_op`;
|
||||
CREATE TABLE `t_machine_term_op` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`machine_id` bigint NOT NULL COMMENT '机器id',
|
||||
`username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '登录用户名',
|
||||
`record_file_path` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '终端回放文件路径',
|
||||
`creator_id` bigint unsigned DEFAULT NULL,
|
||||
`creator` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`create_time` datetime NOT NULL,
|
||||
`end_time` datetime DEFAULT NULL,
|
||||
`is_deleted` tinyint DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='机器终端操作记录表';
|
||||
|
||||
commit;
|
||||
@@ -1,240 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_backup
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_backup`;
|
||||
CREATE TABLE `t_db_backup` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(32) NOT NULL COMMENT '备份名称',
|
||||
`db_instance_id` bigint(20) unsigned NOT NULL COMMENT '数据库实例ID',
|
||||
`db_name` varchar(64) NOT NULL COMMENT '数据库名称',
|
||||
`repeated` tinyint(1) DEFAULT NULL COMMENT '是否重复执行',
|
||||
`interval` bigint(20) DEFAULT NULL COMMENT '备份周期',
|
||||
`start_time` datetime DEFAULT NULL COMMENT '首次备份时间',
|
||||
`enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||
`last_status` tinyint(4) DEFAULT NULL COMMENT '上次备份状态',
|
||||
`last_result` varchar(256) DEFAULT NULL COMMENT '上次备份结果',
|
||||
`last_time` datetime DEFAULT NULL COMMENT '上次备份时间',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`creator_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`creator` varchar(32) DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
`modifier_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`modifier` varchar(32) DEFAULT NULL,
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_db_name` (`db_name`) USING BTREE,
|
||||
KEY `idx_db_instance_id` (`db_instance_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_backup_history
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_backup_history`;
|
||||
CREATE TABLE `t_db_backup_history` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(64) NOT NULL COMMENT '历史备份名称',
|
||||
`db_backup_id` bigint(20) unsigned NOT NULL COMMENT '数据库备份ID',
|
||||
`db_instance_id` bigint(20) unsigned NOT NULL COMMENT '数据库实例ID',
|
||||
`db_name` varchar(64) NOT NULL COMMENT '数据库名称',
|
||||
`uuid` varchar(36) NOT NULL COMMENT '历史备份uuid',
|
||||
`binlog_file_name` varchar(32) DEFAULT NULL COMMENT 'BINLOG文件名',
|
||||
`binlog_sequence` bigint(20) DEFAULT NULL COMMENT 'BINLOG序列号',
|
||||
`binlog_position` bigint(20) DEFAULT NULL COMMENT 'BINLOG位置',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '历史备份创建时间',
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_db_backup_id` (`db_backup_id`) USING BTREE,
|
||||
KEY `idx_db_instance_id` (`db_instance_id`) USING BTREE,
|
||||
KEY `idx_db_name` (`db_name`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_restore
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_restore`;
|
||||
CREATE TABLE `t_db_restore` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`db_instance_id` bigint(20) unsigned NOT NULL COMMENT '数据库实例ID',
|
||||
`db_name` varchar(64) NOT NULL COMMENT '数据库名称',
|
||||
`repeated` tinyint(1) DEFAULT NULL COMMENT '是否重复执行',
|
||||
`interval` bigint(20) DEFAULT NULL COMMENT '恢复周期',
|
||||
`start_time` datetime DEFAULT NULL COMMENT '首次恢复时间',
|
||||
`enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||
`last_status` tinyint(4) DEFAULT NULL COMMENT '上次恢复状态',
|
||||
`last_result` varchar(256) DEFAULT NULL COMMENT '上次恢复结果',
|
||||
`last_time` datetime DEFAULT NULL COMMENT '上次恢复时间',
|
||||
`point_in_time` datetime DEFAULT NULL COMMENT '恢复时间点',
|
||||
`db_backup_id` bigint(20) unsigned DEFAULT NULL COMMENT '备份ID',
|
||||
`db_backup_history_id` bigint(20) unsigned DEFAULT NULL COMMENT '历史备份ID',
|
||||
`db_backup_history_name` varchar(64) DEFAULT NULL COMMENT '历史备份名称',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`creator_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`creator` varchar(32) DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
`modifier_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`modifier` varchar(32) DEFAULT NULL,
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_db_instane_id` (`db_instance_id`) USING BTREE,
|
||||
KEY `idx_db_name` (`db_name`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_restore_history
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_restore_history`;
|
||||
CREATE TABLE `t_db_restore_history` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`db_restore_id` bigint(20) unsigned NOT NULL COMMENT '恢复ID',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '历史恢复创建时间',
|
||||
`is_deleted` tinyint(4) NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_db_restore_id` (`db_restore_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_binlog
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_binlog`;
|
||||
CREATE TABLE `t_db_binlog` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`db_instance_id` bigint(20) unsigned NOT NULL COMMENT '数据库实例ID',
|
||||
`last_status` bigint(20) DEFAULT NULL COMMENT '上次下载状态',
|
||||
`last_result` varchar(256) DEFAULT NULL COMMENT '上次下载结果',
|
||||
`last_time` datetime DEFAULT NULL COMMENT '上次下载时间',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`creator_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`creator` varchar(32) DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
`modifier_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`modifier` varchar(32) DEFAULT NULL,
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_db_instance_id` (`db_instance_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_binlog_history
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_binlog_history`;
|
||||
CREATE TABLE `t_db_binlog_history` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`db_instance_id` bigint(20) unsigned NOT NULL COMMENT '数据库实例ID',
|
||||
`file_name` varchar(32) DEFAULT NULL COMMENT 'BINLOG文件名称',
|
||||
`file_size` bigint(20) DEFAULT NULL COMMENT 'BINLOG文件大小',
|
||||
`sequence` bigint(20) DEFAULT NULL COMMENT 'BINLOG序列号',
|
||||
`first_event_time` datetime DEFAULT NULL COMMENT '首次事件时间',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`is_deleted` tinyint(4) NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_db_instance_id` (`db_instance_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_data_sync_task
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_data_sync_task`;
|
||||
CREATE TABLE `t_db_data_sync_task`
|
||||
(
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`creator_id` bigint(20) NOT NULL COMMENT '创建人id',
|
||||
`creator` varchar(100) NOT NULL COMMENT '创建人姓名',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`modifier` varchar(100) NOT NULL COMMENT '修改人姓名',
|
||||
`modifier_id` bigint(20) NOT NULL COMMENT '修改人id',
|
||||
`task_name` varchar(500) NOT NULL COMMENT '任务名',
|
||||
`task_cron` varchar(50) NOT NULL COMMENT '任务Cron表达式',
|
||||
`src_db_id` bigint(20) NOT NULL COMMENT '源数据库ID',
|
||||
`src_db_name` varchar(100) DEFAULT NULL COMMENT '源数据库名',
|
||||
`src_tag_path` varchar(200) DEFAULT NULL COMMENT '源数据库tag路径',
|
||||
`target_db_id` bigint(20) NOT NULL COMMENT '目标数据库ID',
|
||||
`target_db_name` varchar(100) DEFAULT NULL COMMENT '目标数据库名',
|
||||
`target_tag_path` varchar(200) DEFAULT NULL COMMENT '目标数据库tag路径',
|
||||
`target_table_name` varchar(100) DEFAULT NULL COMMENT '目标数据库表名',
|
||||
`data_sql` text NOT NULL COMMENT '数据查询sql',
|
||||
`page_size` int(11) NOT NULL COMMENT '数据同步分页大小',
|
||||
`upd_field` varchar(100) NOT NULL DEFAULT 'id' COMMENT '更新字段,默认"id"',
|
||||
`upd_field_val` varchar(100) DEFAULT NULL COMMENT '当前更新值',
|
||||
`id_rule` tinyint(2) NOT NULL DEFAULT '1' COMMENT 'id生成规则:1、MD5(时间戳+更新字段的值)。2、无(不自动生成id,选择无的时候需要指定主键ID字段是数据源哪个字段)',
|
||||
`pk_field` varchar(100) DEFAULT 'id' COMMENT '主键id字段名,默认"id"',
|
||||
`field_map` text COMMENT '字段映射json',
|
||||
`is_deleted` tinyint(8) DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1启用 2停用',
|
||||
`recent_state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '最近一次状态 0未执行 1成功 2失败',
|
||||
`task_key` varchar(100) DEFAULT NULL COMMENT '定时任务唯一uuid key',
|
||||
`running_state` tinyint(1) DEFAULT '2' COMMENT '运行时状态 1运行中、2待运行、3已停止',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT='数据同步';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_db_data_sync_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_db_data_sync_log`;
|
||||
CREATE TABLE `t_db_data_sync_log`
|
||||
(
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
||||
`task_id` bigint(20) NOT NULL COMMENT '同步任务表id',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`data_sql_full` text NOT NULL COMMENT '执行的完整sql',
|
||||
`res_num` int(11) DEFAULT NULL COMMENT '收到数据条数',
|
||||
`err_text` text COMMENT '错误日志',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1.成功 0.失败',
|
||||
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除 1是 0 否',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `t_db_data_sync_log_taskid_idx` (`task_id`) USING BTREE COMMENT 't_db_data_sync_log表(taskid)普通索引'
|
||||
) COMMENT='数据同步日志';
|
||||
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`,
|
||||
`modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`,
|
||||
`delete_time`)
|
||||
VALUES (150, 36, 1, 1, '数据同步', 'sync', 1693040707,
|
||||
'{\"component\":\"ops/db/SyncTaskList\",\"icon\":\"Coin\",\"isKeepAlive\":true,\"routeName\":\"SyncTaskList\"}',
|
||||
12, 'liuzongyang', 12, 'liuzongyang', '2023-12-22 09:51:34', '2023-12-27 10:16:57', 'Jra0n7De/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`,
|
||||
`modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`,
|
||||
`delete_time`)
|
||||
VALUES (151, 150, 2, 1, '基本权限', 'db:sync', 1703641202, 'null', 12, 'liuzongyang', 12, 'liuzongyang',
|
||||
'2023-12-27 09:40:02', '2023-12-27 09:40:02', 'Jra0n7De/uAnHZxEV/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`,
|
||||
`modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`,
|
||||
`delete_time`)
|
||||
VALUES (152, 150, 2, 1, '编辑', 'db:sync:save', 1703641320, 'null', 12, 'liuzongyang', 12, 'liuzongyang',
|
||||
'2023-12-27 09:42:00', '2023-12-27 09:42:12', 'Jra0n7De/zvAMo2vk/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`,
|
||||
`modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`,
|
||||
`delete_time`)
|
||||
VALUES (153, 150, 2, 1, '删除', 'db:sync:del', 1703641342, 'null', 12, 'liuzongyang', 12, 'liuzongyang',
|
||||
'2023-12-27 09:42:22', '2023-12-27 09:42:22', 'Jra0n7De/pLOA2UYz/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`,
|
||||
`modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`,
|
||||
`delete_time`)
|
||||
VALUES (154, 150, 2, 1, '启停', 'db:sync:status', 1703641364, 'null', 12, 'liuzongyang', 12, 'liuzongyang',
|
||||
'2023-12-27 09:42:45', '2023-12-27 09:42:45', 'Jra0n7De/VBt68CDx/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`,
|
||||
`modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`,
|
||||
`delete_time`)
|
||||
VALUES (155, 150, 2, 1, '日志', 'db:sync:log', 1704266866, 'null', 12, 'liuzongyang', 12, 'liuzongyang',
|
||||
'2024-01-03 15:27:47', '2024-01-03 15:27:47', 'Jra0n7De/PigmSGVg/', 0, NULL);
|
||||
|
||||
|
||||
DELETE
|
||||
FROM `t_sys_config`
|
||||
WHERE `key` = 'UseWatermark';
|
||||
|
||||
INSERT INTO `t_sys_config` (`name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('系统全局样式设置', 'SysStyleConfig', '[{"model":"logoIcon","name":"logo图标","placeholder":"系统logo图标(base64编码, 建议svg格式,不超过10k)","required":false},{"model":"title","name":"菜单栏标题","placeholder":"系统菜单栏标题展示","required":false},{"model":"viceTitle","name":"登录页标题","placeholder":"登录页标题展示","required":false},{"model":"useWatermark","name":"是否启用水印","placeholder":"是否启用系统水印","options":"true,false","required":false},{"model":"watermarkContent","name":"水印补充信息","placeholder":"额外水印信息","required":false}]', '{"title":"mayfly-go","viceTitle":"mayfly-go","logoIcon":"","useWatermark":"true","watermarkContent":""}', '系统icon、标题、水印信息等配置', 'all', '2024-01-04 15:17:18', 1, 'admin', '2024-01-05 09:40:44', 1, 'admin', 0, NULL);
|
||||
INSERT INTO `t_sys_config` (`name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('数据库备份恢复', 'DbBackupRestore', '[{"model":"backupPath","name":"备份路径","placeholder":"备份文件存储路径"}]', '{"backupPath":"./db/backup"}', '', 'admin,', '2023-12-29 09:55:26', 1, 'admin', '2023-12-29 15:45:24', 1, 'admin', 0, NULL);
|
||||
INSERT INTO `t_sys_config` (`name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('Mysql可执行文件', 'MysqlBin', '[{"model":"path","name":"路径","placeholder":"可执行文件路径","required":true},{"model":"mysql","name":"mysql","placeholder":"mysql命令路径(空则为 路径/mysql)","required":false},{"model":"mysqldump","name":"mysqldump","placeholder":"mysqldump命令路径(空则为 路径/mysqldump)","required":false},{"model":"mysqlbinlog","name":"mysqlbinlog","placeholder":"mysqlbinlog命令路径(空则为 路径/mysqlbinlog)","required":false}]', '{"mysql":"","mysqldump":"","mysqlbinlog":"","path":"./db/mysql/bin"}', '', 'admin,', '2023-12-29 10:01:33', 1, 'admin', '2023-12-29 13:34:40', 1, 'admin', 0, NULL);
|
||||
INSERT INTO `t_sys_config` (`name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('MariaDB可执行文件', 'MariadbBin', '[{"model":"path","name":"路径","placeholder":"可执行文件路径","required":true},{"model":"mysql","name":"mysql","placeholder":"mysql命令路径(空则为 路径/mysql)","required":false},{"model":"mysqldump","name":"mysqldump","placeholder":"mysqldump命令路径(空则为 路径/mysqldump)","required":false},{"model":"mysqlbinlog","name":"mysqlbinlog","placeholder":"mysqlbinlog命令路径(空则为 路径/mysqlbinlog)","required":false}]', '{"mysql":"","mysqldump":"","mysqlbinlog":"","path":"./db/mariadb/bin"}', '', 'admin,', '2023-12-29 10:01:33', 1, 'admin', '2023-12-29 13:34:40', 1, 'admin', 0, NULL);
|
||||
|
||||
|
||||
ALTER TABLE `t_db_instance`
|
||||
ADD COLUMN `sid` varchar(255) NULL COMMENT 'oracle数据库需要sid' AFTER `port`;
|
||||
@@ -1,3 +0,0 @@
|
||||
ALTER TABLE `t_db_instance`
|
||||
MODIFY `port` int (8) NULL comment '数据库端口',
|
||||
MODIFY `username` varchar (255) NULL comment '数据库用户名';
|
||||
@@ -1,12 +0,0 @@
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(160, 49, 'dbms23ax/xleaiec2/3NUXQFIO/', 2, 1, '数据库备份', 'db:backup', 1705973876, 'null', 1, 'admin', 1, 'admin', '2024-01-23 09:37:56', '2024-01-23 09:37:56', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(161, 49, 'dbms23ax/xleaiec2/ghErkTdb/', 2, 1, '数据库恢复', 'db:restore', 1705973909, 'null', 1, 'admin', 1, 'admin', '2024-01-23 09:38:29', '2024-01-23 09:38:29', 0, NULL);
|
||||
|
||||
ALTER TABLE `t_db_backup`
|
||||
ADD COLUMN `enabled_desc` varchar(64) NULL COMMENT '任务启用描述' AFTER `enabled`;
|
||||
|
||||
ALTER TABLE `t_db_restore`
|
||||
ADD COLUMN `enabled_desc` varchar(64) NULL COMMENT '任务启用描述' AFTER `enabled`;
|
||||
|
||||
ALTER TABLE `t_db_backup_history`
|
||||
ADD COLUMN `restoring` tinyint(1) NOT NULL DEFAULT '0' COMMENT '备份历史恢复标识',
|
||||
ADD COLUMN `deleting` tinyint(1) NOT NULL DEFAULT '0' COMMENT '备份历史删除标识';
|
||||
@@ -1,8 +0,0 @@
|
||||
ALTER TABLE `t_db_backup`
|
||||
ADD COLUMN `max_save_days` int(8) NOT NULL DEFAULT '0' COMMENT '最大保存天数' AFTER `interval`;
|
||||
|
||||
ALTER TABLE `t_db_binlog_history`
|
||||
ADD COLUMN `last_event_time` datetime NULL DEFAULT NULL COMMENT '最新事件时间' AFTER `first_event_time`;
|
||||
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1707206386, 2, 1, 1, '机器操作', 'machines-op', 1, '{"component":"ops/machine/MachineOp","icon":"Monitor","isKeepAlive":true,"routeName":"MachineOp"}', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-06 15:59:46', '2024-02-06 16:24:21', 'PDPt6217/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1707206421, 1707206386, 2, 1, '基本权限', 'machine-op', 1707206421, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-06 16:00:22', '2024-02-06 16:00:22', 'PDPt6217/kQXTYvuM/', 0, NULL);
|
||||
@@ -1,92 +0,0 @@
|
||||
begin;
|
||||
|
||||
-- 新增工单流程相关菜单
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1709208354, 1708911264, '6egfEVYr/fw0Hhvye/b4cNf3iq/', 2, 1, '删除流程', 'flow:procdef:del', 1709208354, 'null', 1, 'admin', 1, 'admin', '2024-02-29 20:05:54', '2024-02-29 20:05:54', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1709208339, 1708911264, '6egfEVYr/fw0Hhvye/r9ZMTHqC/', 2, 1, '保存流程', 'flow:procdef:save', 1709208339, 'null', 1, 'admin', 1, 'admin', '2024-02-29 20:05:40', '2024-02-29 20:05:40', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1709103180, 1708910975, '6egfEVYr/oNCIbynR/', 1, 1, '我的流程', 'procinsts', 1708911263, '{"component":"flow/ProcinstList","icon":"Tickets","isKeepAlive":true,"routeName":"ProcinstList"}', 1, 'admin', 1, 'admin', '2024-02-28 14:53:00', '2024-02-29 20:36:07', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1709045735, 1708910975, '6egfEVYr/3r3hHEub/', 1, 1, '我的任务', 'procinst-tasks', 1708911263, '{"component":"flow/ProcinstTaskList","icon":"Tickets","isKeepAlive":true,"routeName":"ProcinstTaskList"}', 1, 'admin', 1, 'admin', '2024-02-27 22:55:35', '2024-02-27 22:56:35', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1708911264, 1708910975, '6egfEVYr/fw0Hhvye/', 1, 1, '流程定义', 'procdefs', 1708911264, '{"component":"flow/ProcdefList","icon":"List","isKeepAlive":true,"routeName":"ProcdefList"}', 1, 'admin', 1, 'admin', '2024-02-26 09:34:24', '2024-02-27 22:54:32', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1708910975, 0, '6egfEVYr/', 1, 1, '工单流程', '/flow', 60000000, '{"icon":"List","isKeepAlive":true,"routeName":"flow"}', 1, 'admin', 1, 'admin', '2024-02-26 09:29:36', '2024-02-26 15:37:52', 0, NULL);
|
||||
|
||||
-- 工单流程相关表
|
||||
CREATE TABLE `t_flow_procdef` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`def_key` varchar(100) NOT NULL COMMENT '流程定义key',
|
||||
`name` varchar(191) DEFAULT NULL COMMENT '流程名称',
|
||||
`status` tinyint DEFAULT NULL COMMENT '状态',
|
||||
`tasks` varchar(3000) COLLATE utf8mb4_bin NOT NULL COMMENT '审批节点任务信息',
|
||||
`remark` varchar(191) DEFAULT NULL,
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator` varchar(191) DEFAULT NULL,
|
||||
`creator_id` bigint NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier` varchar(191) DEFAULT NULL,
|
||||
`modifier_id` bigint NOT NULL,
|
||||
`is_deleted` tinyint DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT='流程-流程定义';
|
||||
|
||||
CREATE TABLE `t_flow_procinst` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`procdef_id` bigint NOT NULL COMMENT '流程定义id',
|
||||
`procdef_name` varchar(64) NOT NULL COMMENT '流程定义名称',
|
||||
`task_key` varchar(100) DEFAULT NULL COMMENT '当前任务key',
|
||||
`status` tinyint DEFAULT NULL COMMENT '状态',
|
||||
`biz_type` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '关联业务类型',
|
||||
`biz_key` varchar(64) NOT NULL COMMENT '关联业务key',
|
||||
`biz_form` text DEFAULT NULL COMMENT '业务form',
|
||||
`biz_status` tinyint DEFAULT NULL COMMENT '业务状态',
|
||||
`biz_handle_res` varchar(1000) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关联的业务处理结果',
|
||||
`remark` varchar(191) DEFAULT NULL,
|
||||
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
|
||||
`duration` bigint DEFAULT NULL COMMENT '流程持续时间(开始到结束)',
|
||||
`create_time` datetime NOT NULL COMMENT '流程发起时间',
|
||||
`creator` varchar(191) DEFAULT NULL COMMENT '流程发起人',
|
||||
`creator_id` bigint NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier` varchar(191) DEFAULT NULL,
|
||||
`modifier_id` bigint NOT NULL,
|
||||
`is_deleted` tinyint DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_procdef_id` (`procdef_id`) USING BTREE
|
||||
) COMMENT='流程-流程实例(根据流程定义开启一个流程)';
|
||||
|
||||
CREATE TABLE `t_flow_procinst_task` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`procinst_id` bigint NOT NULL COMMENT '流程实例id',
|
||||
`task_key` varchar(64) NOT NULL COMMENT '任务key',
|
||||
`task_name` varchar(64) DEFAULT NULL COMMENT '任务名称',
|
||||
`assignee` varchar(64) DEFAULT NULL COMMENT '分配到该任务的用户',
|
||||
`status` tinyint DEFAULT NULL COMMENT '状态',
|
||||
`remark` varchar(191) DEFAULT NULL,
|
||||
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
|
||||
`duration` bigint DEFAULT NULL COMMENT '任务持续时间(开始到结束)',
|
||||
`create_time` datetime NOT NULL COMMENT '任务开始时间',
|
||||
`creator` varchar(191) DEFAULT NULL,
|
||||
`creator_id` bigint NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier` varchar(191) DEFAULT NULL,
|
||||
`modifier_id` bigint NOT NULL,
|
||||
`is_deleted` tinyint DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_procinst_id` (`procinst_id`) USING BTREE
|
||||
) COMMENT='流程-流程实例任务';
|
||||
|
||||
-- 新增工单流程相关字段
|
||||
ALTER TABLE t_db_sql_exec ADD status tinyint NULL COMMENT '执行状态';
|
||||
ALTER TABLE t_db_sql_exec ADD flow_biz_key varchar(64) NULL COMMENT '工单流程定义key';
|
||||
ALTER TABLE t_db_sql_exec ADD res varchar(1000) NULL COMMENT '执行结果';
|
||||
|
||||
ALTER TABLE t_db ADD flow_procdef_key varchar(64) NULL COMMENT '审批流-流程定义key(有值则说明关键操作需要进行审批执行)';
|
||||
ALTER TABLE t_redis ADD flow_procdef_key varchar(64) NULL COMMENT '审批流-流程定义key(有值则说明关键操作需要进行审批执行)';
|
||||
|
||||
-- 历史执行记录调整为成功状态
|
||||
UPDATE t_db_sql_exec SET status = 2;
|
||||
|
||||
ALTER TABLE `t_db_data_sync_task`
|
||||
ADD COLUMN `duplicate_strategy` tinyint(1) NULL DEFAULT -1 comment '冲突策略 -1:无,1:忽略,2:覆盖';
|
||||
|
||||
commit;
|
||||
@@ -1,247 +0,0 @@
|
||||
|
||||
-- DBMS配置变动
|
||||
DELETE FROM `t_sys_config` WHERE `key` in ('DbQueryMaxCount', 'DbSaveQuerySQL');
|
||||
INSERT INTO `t_sys_config` (`name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('DBMS配置', 'DbmsConfig', '[{"model":"querySqlSave","name":"记录查询sql","placeholder":"是否记录查询类sql","options":"true,false"},{"model":"maxResultSet","name":"最大结果集","placeholder":"允许sql查询的最大结果集数。注: 0=不限制","options":""},{"model":"sqlExecTl","name":"sql执行时间限制","placeholder":"超过该时间(单位:秒),执行将被取消"}]', '{"querySqlSave":"false","maxResultSet":"0","sqlExecTl":"60"}', 'DBMS相关配置', 'admin,', '2024-03-06 13:30:51', 1, 'admin', '2024-03-06 14:07:16', 1, 'admin', 0, NULL);
|
||||
ALTER TABLE `t_db_instance` CHANGE sid extra varchar(255) NULL COMMENT '连接需要的额外参数,如oracle数据库需要sid等';
|
||||
ALTER TABLE `t_db_instance` MODIFY COLUMN extra varchar(255) NULL COMMENT '连接需要的额外参数,如oracle数据库需要sid等';
|
||||
|
||||
-- 数据迁移相关
|
||||
CREATE TABLE `t_db_transfer_task` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`creator_id` bigint(20) NOT NULL COMMENT '创建人id',
|
||||
`creator` varchar(100) NOT NULL COMMENT '创建人姓名',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modifier_id` bigint(20) NOT NULL COMMENT '修改人id',
|
||||
`modifier` varchar(100) NOT NULL COMMENT '修改人姓名',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`is_deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除',
|
||||
`delete_time` datetime DEFAULT NULL COMMENT '删除时间',
|
||||
`checked_keys` text NOT NULL COMMENT '选中需要迁移的表',
|
||||
`delete_table` tinyint(4) NOT NULL COMMENT '创建表前是否删除表 1是 -1否',
|
||||
`name_case` tinyint(4) NOT NULL COMMENT '表名、字段大小写转换 1无 2大写 3小写',
|
||||
`strategy` tinyint(4) NOT NULL COMMENT '迁移策略 1全量 2增量',
|
||||
`running_state` tinyint(1) DEFAULT '2' COMMENT '运行状态 1运行中 2待运行',
|
||||
`src_db_id` bigint(20) NOT NULL COMMENT '源库id',
|
||||
`src_db_name` varchar(200) NOT NULL COMMENT '源库名',
|
||||
`src_tag_path` varchar(200) NOT NULL COMMENT '源库tagPath',
|
||||
`src_db_type` varchar(200) NOT NULL COMMENT '源库类型',
|
||||
`src_inst_name` varchar(200) NOT NULL COMMENT '源库实例名',
|
||||
`target_db_id` bigint(20) NOT NULL COMMENT '目标库id',
|
||||
`target_db_name` varchar(200) NOT NULL COMMENT '目标库名',
|
||||
`target_tag_path` varchar(200) NOT NULL COMMENT '目标库类型',
|
||||
`target_db_type` varchar(200) NOT NULL COMMENT '目标库实例名',
|
||||
`target_inst_name` varchar(200) NOT NULL COMMENT '目标库tagPath',
|
||||
`log_id` bigint(20) NOT NULL COMMENT '日志id',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT='数据库迁移任务表';
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709194669, 36, 1, 1, '数据库迁移', 'transfer', 1709194669, '{"component":"ops/db/DbTransferList","icon":"Switch","isKeepAlive":true,"routeName":"DbTransferList"}', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:17:50', '2024-02-29 16:24:59', 'SmLcpu6c/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709194694, 1709194669, 2, 1, '基本权限', 'db:transfer', 1709194694, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:18:14', '2024-02-29 16:18:14', 'SmLcpu6c/A9vAm4J8/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709196697, 1709194669, 2, 1, '编辑', 'db:transfer:save', 1709196697, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:51:37', '2024-02-29 16:51:37', 'SmLcpu6c/5oJwPzNb/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709196707, 1709194669, 2, 1, '删除', 'db:transfer:del', 1709196707, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:51:47', '2024-02-29 16:51:47', 'SmLcpu6c/L3ybnAEW/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709196723, 1709194669, 2, 1, '启停', 'db:transfer:status', 1709196723, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:52:04', '2024-02-29 16:52:04', 'SmLcpu6c/hGiLN1VT/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709196737, 1709194669, 2, 1, '日志', 'db:transfer:log', 1709196737, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:52:17', '2024-02-29 16:52:17', 'SmLcpu6c/CZhNIbWg/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1709196755, 1709194669, 2, 1, '运行', 'db:transfer:run', 1709196755, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-02-29 16:52:36', '2024-02-29 16:52:36', 'SmLcpu6c/b6yHt6V2/', 0, NULL);
|
||||
ALTER TABLE t_sys_log ADD extra text NULL;
|
||||
ALTER TABLE t_sys_log MODIFY COLUMN resp text NULL;
|
||||
|
||||
-- rdp相关
|
||||
ALTER TABLE `t_machine` ADD COLUMN `protocol` tinyint(2) NULL COMMENT '协议 1、SSH 2、RDP' AFTER `name`;
|
||||
update `t_machine` set `protocol` = 1 where `protocol` is NULL;
|
||||
delete from `t_sys_config` where `key` = 'MachineConfig';
|
||||
INSERT INTO `t_sys_config` ( `name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('机器相关配置', 'MachineConfig', '[{"name":"终端回放存储路径","model":"terminalRecPath","placeholder":"终端回放存储路径"},{"name":"uploadMaxFileSize","model":"uploadMaxFileSize","placeholder":"允许上传的最大文件大小(1MB、2GB等)"},{"model":"termOpSaveDays","name":"终端记录保存时间","placeholder":"终端记录保存时间(单位天)"},{"model":"guacdHost","name":"guacd服务ip","placeholder":"guacd服务ip,默认 127.0.0.1","required":false},{"name":"guacd服务端口","model":"guacdPort","placeholder":"guacd服务端口,默认 4822","required":false},{"model":"guacdFilePath","name":"guacd服务文件存储位置","placeholder":"guacd服务文件存储位置,用于挂载RDP文件夹"},{"name":"guacd服务记录存储位置","model":"guacdRecPath","placeholder":"guacd服务记录存储位置,用于记录rdp操作记录"}]', '{"terminalRecPath":"./rec","uploadMaxFileSize":"1000MB","termOpSaveDays":"30","guacdHost":"","guacdPort":"","guacdFilePath":"./guacd/rdp-file","guacdRecPath":"./guacd/rdp-rec"}', '机器相关配置,如终端回放路径等', 'all', '2023-07-13 16:26:44', 1, 'admin', '2024-04-06 12:25:03', 1, 'admin', 0, NULL);
|
||||
|
||||
-- 授权凭证相关
|
||||
CREATE TABLE `t_resource_auth_cert` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '账号名称',
|
||||
`resource_code` varchar(36) DEFAULT NULL COMMENT '资源编码',
|
||||
`resource_type` tinyint NOT NULL COMMENT '资源类型',
|
||||
`type` tinyint DEFAULT NULL COMMENT '凭证类型',
|
||||
`username` varchar(100) DEFAULT NULL COMMENT '用户名',
|
||||
`ciphertext` varchar(5000) DEFAULT NULL COMMENT '密文内容',
|
||||
`ciphertext_type` tinyint NOT NULL COMMENT '密文类型(-1.公共授权凭证 1.密码 2.秘钥)',
|
||||
`extra` varchar(200) DEFAULT NULL COMMENT '账号需要的其他额外信息(如秘钥口令等)',
|
||||
`remark` varchar(50) DEFAULT NULL COMMENT '备注',
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator_id` bigint NOT NULL,
|
||||
`creator` varchar(36) NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier_id` bigint NOT NULL,
|
||||
`modifier` varchar(36) NOT NULL,
|
||||
`is_deleted` tinyint DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_resource_code` (`resource_code`) USING BTREE,
|
||||
KEY `idx_name` (`name`) USING BTREE
|
||||
) COMMENT='资源授权凭证表';
|
||||
|
||||
ALTER TABLE t_tag_tree ADD `type` tinyint NOT NULL DEFAULT '-1' COMMENT '类型: -1.普通标签; 其他值则为对应的资源类型' AFTER `code_path`;
|
||||
ALTER TABLE t_db_instance ADD `code` varchar(36) NULL COMMENT '唯一编号' AFTER id;
|
||||
ALTER TABLE t_db ADD auth_cert_name varchar(36) NULL COMMENT '授权凭证名' AFTER instance_id;
|
||||
ALTER TABLE t_tag_tree MODIFY COLUMN code_path varchar(555) NOT NULL COMMENT '标识符路径';
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO t_tag_tree ( pid, CODE, code_path, type, NAME, create_time, creator_id, creator, update_time, modifier_id, modifier, is_deleted )
|
||||
SELECT
|
||||
tag_id,
|
||||
resource_code,
|
||||
CONCAT(tag_path ,resource_type , '|', resource_code, '/'),
|
||||
resource_type,
|
||||
resource_code,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
t_tag_resource
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
-- 迁移machine表账号密码
|
||||
INSERT INTO `t_resource_auth_cert` ( `name`, `resource_code`, `resource_type`, `username`, `ciphertext`, `ciphertext_type`, `type`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted` )
|
||||
SELECT
|
||||
CONCAT( 'machine_', CODE, '_', username ) name,
|
||||
CODE resource_code,
|
||||
1 resource_type,
|
||||
username username,
|
||||
CASE
|
||||
WHEN auth_cert_id = - 1
|
||||
OR auth_cert_id IS NULL THEN
|
||||
`password` ELSE concat( 'auth_cert_', auth_cert_id )
|
||||
END ciphertext,
|
||||
CASE
|
||||
WHEN auth_cert_id = - 1
|
||||
OR auth_cert_id IS NULL THEN
|
||||
1 ELSE - 1
|
||||
END ciphertext_type,
|
||||
1 type,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ) create_time,
|
||||
1 creator_id,
|
||||
'admin' creator,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ) update_time,
|
||||
1 modifier_id,
|
||||
'admin' modifier,
|
||||
0 is_deleted
|
||||
FROM
|
||||
t_machine
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
-- 迁移公共密钥
|
||||
INSERT INTO `t_resource_auth_cert` ( `name`, `remark`, `resource_code`, `resource_type`, `username`, `ciphertext`, `extra`, `ciphertext_type`, `type`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted` )
|
||||
SELECT
|
||||
concat( 'auth_cert_', id ) `name`,
|
||||
`name` remark,
|
||||
concat( 'auth_cert_code_', id ) resource_code,
|
||||
-2 resource_type,
|
||||
t.username username,
|
||||
`password` ciphertext,
|
||||
case when passphrase is not null and passphrase !='' then concat('{"passphrase":"', passphrase,'"}') else null end extra,
|
||||
auth_method ciphertext_type,
|
||||
2 type,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ) create_time,
|
||||
1 creator_id,
|
||||
'admin' creator,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ) update_time,
|
||||
1 modifier_id,
|
||||
'admin' modifier,
|
||||
0 is_deleted
|
||||
FROM
|
||||
t_auth_cert a
|
||||
join (select `ciphertext`, `username` from `t_resource_auth_cert` GROUP BY `ciphertext`, `username` ) t on t.ciphertext = concat( 'auth_cert_', a.id )
|
||||
;
|
||||
|
||||
-- 关联机器账号到tag_tree
|
||||
INSERT INTO t_tag_tree ( pid, CODE, code_path, type, NAME, create_time, creator_id, creator, update_time, modifier_id, modifier, is_deleted )
|
||||
SELECT
|
||||
tt.id,
|
||||
rac.`name`,
|
||||
CONCAT(tt.code_path, '11|' ,rac.`name`, '/'),
|
||||
11,
|
||||
rac.`username`,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
`t_tag_tree` tt
|
||||
JOIN `t_resource_auth_cert` rac ON tt.`code` = rac.`resource_code`
|
||||
AND tt.`type` = rac.`resource_type` AND rac.type = 1
|
||||
WHERE
|
||||
tt.`is_deleted` = 0;
|
||||
|
||||
-- 迁移数据库账号至授权凭证表
|
||||
UPDATE t_db_instance SET `code` = CONCAT('db_code_', id);
|
||||
INSERT INTO t_resource_auth_cert ( NAME, resource_code, resource_type, type, username, ciphertext, ciphertext_type, create_time, creator_id, creator, update_time, modifier_id, modifier, is_deleted )
|
||||
SELECT
|
||||
CONCAT( CODE, '_', username ),
|
||||
CODE,
|
||||
2,
|
||||
1,
|
||||
username,
|
||||
PASSWORD,
|
||||
1,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
t_db_instance
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
UPDATE
|
||||
t_db d
|
||||
SET
|
||||
d.auth_cert_name = (
|
||||
SELECT
|
||||
rac.name
|
||||
FROM
|
||||
t_resource_auth_cert rac
|
||||
join t_db_instance di on
|
||||
rac.resource_code = di.code
|
||||
and rac.resource_type = 2
|
||||
WHERE
|
||||
di.id = d.instance_id);
|
||||
|
||||
UPDATE `t_sys_resource` SET pid=93, ui_path='Tag3fhad/exahgl32/', weight=19999999, meta='{"component":"ops/tag/AuthCertList","icon":"Ticket","isKeepAlive":true,"routeName":"AuthCertList"}' WHERE id=103;
|
||||
UPDATE `t_sys_resource` SET ui_path='Tag3fhad/exahgl32/egxahg24/', weight=10000000 WHERE id=104;
|
||||
UPDATE `t_sys_resource` SET ui_path='Tag3fhad/exahgl32/yglxahg2/', weight=20000000 WHERE id=105;
|
||||
UPDATE `t_sys_resource` SET ui_path='Tag3fhad/exahgl32/Glxag234/', weight=30000000 WHERE id=106;
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) VALUES(1712717290, 0, 'tLb8TKLB/', 1, 1, '无页面权限', 'empty', 1712717290, '{"component":"empty","icon":"Menu","isHide":true,"isKeepAlive":true,"routeName":"empty"}', 1, 'admin', 1, 'admin', '2024-04-10 10:48:10', '2024-04-10 10:48:10', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) VALUES(1712717337, 1712717290, 'tLb8TKLB/m2abQkA8/', 2, 1, '授权凭证密文查看', 'authcert:showciphertext', 1712717337, 'null', 1, 'admin', 1, 'admin', '2024-04-10 10:48:58', '2024-04-10 10:48:58', 0, NULL);
|
||||
commit;
|
||||
|
||||
begin;
|
||||
-- 迁移redis账号密码
|
||||
INSERT INTO t_resource_auth_cert ( NAME, resource_code, resource_type, type, ciphertext, ciphertext_type, create_time, creator_id, creator, update_time, modifier_id, modifier, is_deleted )
|
||||
SELECT
|
||||
CONCAT('redis_', CODE, '_pwd' ),
|
||||
CODE,
|
||||
3,
|
||||
1,
|
||||
PASSWORD,
|
||||
1,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
t_redis
|
||||
WHERE
|
||||
is_deleted = 0;
|
||||
|
||||
ALTER TABLE t_redis DROP COLUMN password;
|
||||
commit;
|
||||
@@ -1,150 +0,0 @@
|
||||
-- 关联数据库实例至标签
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_tree (code_path,
|
||||
code,
|
||||
type,
|
||||
NAME,
|
||||
create_time,
|
||||
creator_id,
|
||||
creator,
|
||||
update_time,
|
||||
modifier_id,
|
||||
modifier,
|
||||
is_deleted )
|
||||
SELECT
|
||||
DISTINCT t1.newCodePath,
|
||||
t1.tagCode,
|
||||
100,
|
||||
t1.tagName,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ttt.code_path,
|
||||
ttt2.code_path as p_code_path,
|
||||
td.name,
|
||||
td.auth_cert_name,
|
||||
tdi.code tagCode,
|
||||
tdi.name tagName,
|
||||
CONCAT(ttt2.code_path, '2|', tdi.code, '/') newCodePath
|
||||
FROM
|
||||
t_tag_tree ttt
|
||||
JOIN t_db td ON
|
||||
ttt.code = td.code
|
||||
AND ttt.type = 2
|
||||
AND td.is_deleted = 0
|
||||
JOIN t_tag_tree ttt2 ON
|
||||
ttt.pid = ttt2.id
|
||||
JOIN t_db_instance tdi ON
|
||||
tdi.id = td.instance_id) AS t1;
|
||||
|
||||
|
||||
-- 关联数据库实例的授权凭证信息至标签
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_tree (code_path,
|
||||
code,
|
||||
type,
|
||||
NAME,
|
||||
create_time,
|
||||
creator_id,
|
||||
creator,
|
||||
update_time,
|
||||
modifier_id,
|
||||
modifier,
|
||||
is_deleted )
|
||||
SELECT
|
||||
DISTINCT t1.newCodePath,
|
||||
t1.tagCode,
|
||||
21,
|
||||
t1.tagName,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ttt.code_path,
|
||||
ttt2.code_path as p_code_path,
|
||||
td.name,
|
||||
td.auth_cert_name,
|
||||
trac.name tagCode,
|
||||
trac.username tagName,
|
||||
CONCAT(ttt2.code_path, '2|', tdi.code, '/21|', trac.name, '/') as newCodePath
|
||||
FROM
|
||||
t_tag_tree ttt
|
||||
JOIN t_db td ON
|
||||
ttt.code = td.code
|
||||
AND ttt.type = 2
|
||||
AND td.is_deleted = 0
|
||||
JOIN t_tag_tree ttt2 ON
|
||||
ttt.pid = ttt2.id
|
||||
JOIN t_db_instance tdi ON
|
||||
tdi.id = td.instance_id
|
||||
JOIN t_resource_auth_cert trac ON
|
||||
trac.name = td.auth_cert_name
|
||||
AND trac.is_deleted = 0) AS t1;
|
||||
|
||||
-- 关联数据库至标签
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_tree (code_path,
|
||||
code,
|
||||
type,
|
||||
NAME,
|
||||
create_time,
|
||||
creator_id,
|
||||
creator,
|
||||
update_time,
|
||||
modifier_id,
|
||||
modifier,
|
||||
is_deleted )
|
||||
SELECT
|
||||
DISTINCT t1.newCodePath,
|
||||
t1.tagCode,
|
||||
22,
|
||||
t1.name,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ttt.code_path,
|
||||
ttt.code_path as p_code_path,
|
||||
td.name ,
|
||||
td.auth_cert_name,
|
||||
td.code tagCode,
|
||||
td.name tagName,
|
||||
CONCAT(ttt.code_path, '22|', td.code, '/') newCodePath
|
||||
FROM
|
||||
t_tag_tree ttt
|
||||
join t_db td on
|
||||
ttt.code = td.auth_cert_name
|
||||
and ttt.type = 21
|
||||
and td.is_deleted = 0) as t1;
|
||||
|
||||
UPDATE t_tag_tree SET is_deleted = 1, delete_time = NOW() WHERE `type` = 2;
|
||||
UPDATE t_tag_tree SET `type` = 2 WHERE `type` = 100;
|
||||
|
||||
ALTER TABLE t_tag_tree DROP COLUMN pid;
|
||||
ALTER TABLE t_tag_tree_team DROP COLUMN tag_path;
|
||||
|
||||
-- 新增记录执行命令字段
|
||||
ALTER TABLE t_machine_term_op ADD exec_cmds TEXT NULL COMMENT '执行的命令记录';
|
||||
ALTER TABLE t_machine_term_op CHANGE exec_cmds exec_cmds TEXT NULL COMMENT '执行的命令记录' AFTER record_file_path;
|
||||
@@ -1,84 +0,0 @@
|
||||
CREATE TABLE `t_tag_tree_relate` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`tag_id` bigint NOT NULL COMMENT '标签树id',
|
||||
`relate_id` bigint NOT NULL COMMENT '关联',
|
||||
`relate_type` tinyint NOT NULL COMMENT '关联类型',
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator_id` bigint NOT NULL,
|
||||
`creator` varchar(36) COLLATE utf8mb4_bin NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier_id` bigint NOT NULL,
|
||||
`modifier` varchar(36) COLLATE utf8mb4_bin NOT NULL,
|
||||
`is_deleted` tinyint NOT NULL DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_tag_id` (`tag_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='与标签树有关联关系的表';
|
||||
|
||||
|
||||
CREATE TABLE `t_machine_cmd_conf` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '名称',
|
||||
`cmds` varchar(500) COLLATE utf8_bin DEFAULT NULL COMMENT '命令配置',
|
||||
`status` tinyint(4) DEFAULT NULL COMMENT '状态',
|
||||
`stratege` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '策略',
|
||||
`remark` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator_id` bigint(20) NOT NULL,
|
||||
`creator` varchar(36) COLLATE utf8_bin NOT NULL,
|
||||
`update_time` datetime NOT NULL,
|
||||
`modifier_id` bigint(20) NOT NULL,
|
||||
`modifier` varchar(36) COLLATE utf8_bin NOT NULL,
|
||||
`is_deleted` tinyint(4) DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 COMMENT='机器命令配置';
|
||||
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1714032002, 1713875842, '12sSjal1/UnWIUhW0/0tJwC3Gf/', 2, 1, '命令配置-删除', 'cmdconf:del', 1714032002, 'null', 1, 'admin', 1, 'admin', '2024-04-25 16:00:02', '2024-04-25 16:00:02', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1714031981, 1713875842, '12sSjal1/UnWIUhW0/tEzIKecl/', 2, 1, '命令配置-保存', 'cmdconf:save', 1714031981, 'null', 1, 'admin', 1, 'admin', '2024-04-25 15:59:41', '2024-04-25 15:59:41', 0, NULL);
|
||||
INSERT INTO t_sys_resource (id, pid, ui_path, `type`, status, name, code, weight, meta, creator_id, creator, modifier_id, modifier, create_time, update_time, is_deleted, delete_time) VALUES(1713875842, 2, '12sSjal1/UnWIUhW0/', 1, 1, '安全配置', 'security', 1713875842, '{"component":"ops/machine/security/SecurityConfList","icon":"Setting","isKeepAlive":true,"routeName":"SecurityConfList"}', 1, 'admin', 1, 'admin', '2024-04-23 20:37:22', '2024-04-23 20:37:22', 0, NULL);
|
||||
|
||||
INSERT
|
||||
INTO
|
||||
t_tag_tree_relate (tag_id,
|
||||
relate_id,
|
||||
relate_type,
|
||||
create_time,
|
||||
creator_id,
|
||||
creator,
|
||||
update_time,
|
||||
modifier_id,
|
||||
modifier,
|
||||
is_deleted )
|
||||
SELECT
|
||||
tt.tag_id ,
|
||||
tt.team_id ,
|
||||
1,
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
DATE_FORMAT( NOW(), '%Y-%m-%d %H:%i:%s' ),
|
||||
1,
|
||||
'admin',
|
||||
0
|
||||
FROM
|
||||
`t_tag_tree_team` tt
|
||||
WHERE
|
||||
tt.`is_deleted` = 0;
|
||||
|
||||
DROP TABLE t_tag_tree_team;
|
||||
|
||||
|
||||
CREATE TABLE `t_resource_op_log` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`code_path` varchar(600) NOT NULL COMMENT '资源标签路径',
|
||||
`resource_code` varchar(32) NOT NULL COMMENT '资源编号',
|
||||
`resource_type` tinyint NOT NULL COMMENT '资源类型',
|
||||
`create_time` datetime NOT NULL,
|
||||
`creator_id` bigint NOT NULL,
|
||||
`creator` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||
`is_deleted` tinyint NOT NULL DEFAULT '0',
|
||||
`delete_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_resource_code` (`resource_code`) USING BTREE
|
||||
) ENGINE=InnoDB COMMENT='资源操作记录';
|
||||
@@ -1,3 +0,0 @@
|
||||
DROP TABLE t_machine_cron_job_relate;
|
||||
ALTER TABLE t_db DROP COLUMN flow_procdef_key;
|
||||
ALTER TABLE t_redis DROP COLUMN flow_procdef_key;
|
||||
@@ -1,4 +0,0 @@
|
||||
ALTER TABLE t_team ADD validity_start_date DATETIME NULL COMMENT '生效开始时间';
|
||||
ALTER TABLE t_team ADD validity_end_date DATETIME NULL COMMENT '生效结束时间';
|
||||
|
||||
UPDATE t_team SET validity_start_date = NOW(), validity_end_date = '2034-01-01 00:00:00'
|
||||
@@ -1,6 +0,0 @@
|
||||
ALTER TABLE t_db ADD get_database_mode tinyint NULL COMMENT '库名获取方式(-1.实时获取、1.指定库名)';
|
||||
UPDATE t_db SET get_database_mode = 1;
|
||||
|
||||
|
||||
ALTER TABLE t_machine_cron_job_exec ADD machine_code varchar(36) NULL COMMENT '机器编号';
|
||||
ALTER TABLE t_machine_cron_job_exec DROP COLUMN machine_id;
|
||||
@@ -1,7 +0,0 @@
|
||||
UPDATE t_sys_resource SET pid=135, ui_path='dbms23ax/X0f4BxT0/leix3Axl/', `type`=2, status=1, name='数据库保存', code='db:save', weight=1693041085, meta='null', creator_id=1, creator='admin', modifier_id=1, modifier='admin', create_time='2021-07-08 17:30:36', update_time='2024-05-17 21:50:01', is_deleted=0, delete_time=NULL WHERE id=54;
|
||||
UPDATE t_sys_resource SET pid=135, ui_path='dbms23ax/X0f4BxT0/ygjL3sxA/', `type`=2, status=1, name='数据库删除', code='db:del', weight=1693041086, meta='null', creator_id=1, creator='admin', modifier_id=1, modifier='admin', create_time='2021-07-08 17:30:48', update_time='2024-05-17 21:50:04', is_deleted=0, delete_time=NULL WHERE id=55;
|
||||
UPDATE t_sys_resource SET pid=135, ui_path='dbms23ax/X0f4BxT0/AceXe321/', `type`=2, status=1, name='数据库基本权限', code='db', weight=1693041085, meta='null', creator_id=1, creator='admin', modifier_id=1, modifier='admin', create_time='2021-07-09 10:48:22', update_time='2024-05-17 21:52:52', is_deleted=0, delete_time=NULL WHERE id=58;
|
||||
UPDATE t_sys_resource SET pid=135, ui_path='dbms23ax/X0f4BxT0/3NUXQFIO/', `type`=2, status=1, name='数据库备份', code='db:backup', weight=1693041087, meta='null', creator_id=1, creator='admin', modifier_id=1, modifier='admin', create_time='2024-01-23 09:37:56', update_time='2024-05-17 21:50:07', is_deleted=0, delete_time=NULL WHERE id=160;
|
||||
UPDATE t_sys_resource SET pid=135, ui_path='dbms23ax/X0f4BxT0/ghErkTdb/', `type`=2, status=1, name='数据库恢复', code='db:restore', weight=1693041088, meta='null', creator_id=1, creator='admin', modifier_id=1, modifier='admin', create_time='2024-01-23 09:38:29', update_time='2024-05-17 21:50:10', is_deleted=0, delete_time=NULL WHERE id=161;
|
||||
|
||||
DELETE FROM t_sys_resource WHERE id=49;
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
-- 数据同步新增字段
|
||||
ALTER TABLE `t_db_data_sync_task`
|
||||
ADD COLUMN `upd_field_src` varchar(100) DEFAULT NULL COMMENT '更新值来源字段,默认同更新字段,如果查询结果指定了字段别名且与原更新字段不一致,则取这个字段值为当前更新值';
|
||||
|
||||
-- 新增数据库迁移到文件的菜单资源
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1724376022, 1709194669, 2, 1, '文件-删除', 'db:transfer:files:del', 1724376022, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-08-23 09:20:23', '2024-08-23 14:50:21', 'SmLcpu6c/HIURtJJA/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1724395850, 1709194669, 2, 1, '文件-下载', 'db:transfer:files:down', 1724395850, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-08-23 14:50:51', '2024-08-23 14:50:51', 'SmLcpu6c/FmqK4azt/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1724398262, 1709194669, 2, 1, '文件', 'db:transfer:files', 1724376021, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-08-23 15:31:02', '2024-08-23 15:31:16', 'SmLcpu6c/btVtrbhk/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `ui_path`, `is_deleted`, `delete_time`) VALUES(1724998419, 1709194669, 2, 1, '文件-执行', 'db:transfer:files:run', 1724998419, 'null', 12, 'liuzongyang', 12, 'liuzongyang', '2024-08-30 14:13:39', '2024-08-30 14:13:39', 'SmLcpu6c/qINungml/', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) VALUES(1729668131, 38, 'dbms23ax/exaeca2x/TGFPA3Ez/', 2, 1, 'SQL脚本执行', 'db:sqlscript:run', 1729668131, 'null', 1, 'admin', 1, 'admin', '2024-10-23 15:22:12', '2024-10-23 15:22:12', 0, NULL);
|
||||
|
||||
-- 新增数据库迁移相关的系统配置
|
||||
DELETE FROM `t_sys_config` WHERE `key` = 'DbBackupRestore';
|
||||
UPDATE `t_sys_config` SET params = '[{"name":"uploadMaxFileSize","model":"uploadMaxFileSize","placeholder":"允许上传的最大文件大小(1MB、2GB等)"},{"model":"termOpSaveDays","name":"终端记录保存时间","placeholder":"终端记录保存时间(单位天)"},{"model":"guacdHost","name":"guacd服务ip","placeholder":"guacd服务ip,默认 127.0.0.1","required":false},{"name":"guacd服务端口","model":"guacdPort","placeholder":"guacd服务端口,默认 4822","required":false},{"model":"guacdFilePath","name":"guacd服务文件存储位置","placeholder":"guacd服务文件存储位置,用于挂载RDP文件夹"}]' WHERE `key`='MachineConfig';
|
||||
INSERT INTO `t_sys_config` (`name`, `key`, `params`, `value`, `remark`, `permission`, `create_time`, `creator_id`, `creator`, `update_time`, `modifier_id`, `modifier`, `is_deleted`, `delete_time`) VALUES('文件配置', 'FileConfig', '[{"model":"basePath","name":"基础路径","placeholder":"默认为可执行文件对应目录下./file"}]', '{"basePath":"./file"}', '系统文件相关配置', 'admin,', '2024-10-20 22:30:01', 1, 'admin', '2024-10-21 13:51:17', 1, 'admin', 0, NULL);
|
||||
|
||||
-- 数据库迁移到文件
|
||||
ALTER TABLE `t_db_transfer_task`
|
||||
ADD COLUMN `task_name` varchar(100) NULL comment '任务名',
|
||||
ADD COLUMN `cron_able` TINYINT(3) NOT NULL DEFAULT 0 comment '是否定时 1是 -1否',
|
||||
ADD COLUMN `cron` VARCHAR(20) NULL comment '定时任务cron表达式',
|
||||
ADD COLUMN `task_key` varchar(100) NULL comment '定时任务唯一uuid key',
|
||||
ADD COLUMN `mode` TINYINT(3) NOT NULL DEFAULT 1 comment '数据迁移方式,1、迁移到数据库 2、迁移到文件',
|
||||
ADD COLUMN `target_file_db_type` varchar(200) NULL comment '目标文件语言类型,类型枚举同target_db_type',
|
||||
ADD COLUMN `file_save_days` int NULL comment '文件保存天数',
|
||||
ADD COLUMN `status` tinyint(3) NOT NULL DEFAULT '1' comment '启用状态 1启用 -1禁用';
|
||||
|
||||
UPDATE `t_db_transfer_task` SET mode = 1 WHERE 1=1;
|
||||
UPDATE `t_db_transfer_task` SET cron_able = -1 WHERE 1=1;
|
||||
UPDATE `t_db_transfer_task` SET task_name = '未命名' WHERE task_name = '' or task_name is null;
|
||||
|
||||
CREATE TABLE `t_db_transfer_files` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`is_deleted` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
`delete_time` datetime COMMENT '删除时间',
|
||||
`status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '状态,1、执行中 2、执行失败 3、 执行成功',
|
||||
`task_id` bigint COMMENT '迁移任务ID',
|
||||
`log_id` bigint COMMENT '日志ID',
|
||||
`file_db_type` varchar(200) COMMENT 'sql文件数据库类型',
|
||||
`file_key` varchar(50) COMMENT '文件',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT '数据库迁移文件管理';
|
||||
|
||||
ALTER TABLE `t_machine_term_op` ADD COLUMN `file_key` varchar(36) DEFAULT NULL COMMENT '文件';
|
||||
|
||||
ALTER TABLE `t_flow_procdef`
|
||||
ADD COLUMN `condition` text NULL comment '触发审批的条件(计算结果返回1则需要启用该流程)';
|
||||
|
||||
UPDATE `t_flow_procinst`
|
||||
SET `biz_type` = 'redis_run_cmd_flow'
|
||||
WHERE
|
||||
`biz_type` = 'redis_run_write_cmd_flow';
|
||||
|
||||
CREATE TABLE `t_sys_file` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`file_key` varchar(32) NOT NULL COMMENT 'key',
|
||||
`filename` varchar(255) NOT NULL COMMENT '文件名',
|
||||
`path` varchar(255) NOT NULL COMMENT '文件路径',
|
||||
`size` int NULL DEFAULT NULL COMMENT '文件大小',
|
||||
`creator_id` bigint NULL DEFAULT NULL,
|
||||
`creator` varchar(32) NULL DEFAULT NULL,
|
||||
`modifier_id` bigint NULL DEFAULT NULL,
|
||||
`modifier` varchar(255) NULL DEFAULT NULL,
|
||||
`create_time` datetime NULL DEFAULT NULL,
|
||||
`update_time` datetime NULL DEFAULT NULL,
|
||||
`is_deleted` tinyint NOT NULL DEFAULT 0,
|
||||
`delete_time` datetime NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_file_key` (`file_key`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统文件表';
|
||||
@@ -1,121 +0,0 @@
|
||||
-- 需要国际化则执行菜单替换
|
||||
DELETE FROM t_sys_resource;
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1, 0, 'Aexqq77l/', 1, 1, 'menu.index', '/home', 10000000, '{"component":"home/Home","icon":"HomeFilled","isAffix":true,"routeName":"Home"}', 1, 'admin', 1, 'admin', '2021-05-25 16:44:41', '2024-11-06 16:18:09', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(2, 0, '12sSjal1/', 1, 1, 'menu.machine', '/machine', 49999998, '{"icon":"Monitor","isKeepAlive":true,"redirect":"machine/list","routeName":"Machine"}', 1, 'admin', 1, 'admin', '2021-05-25 16:48:16', '2024-11-07 11:29:10', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(3, 2, '12sSjal1/lskeiql1/', 1, 1, 'menu.machineList', 'machines', 20000000, '{"component":"ops/machine/MachineList","icon":"Monitor","isKeepAlive":true,"routeName":"MachineList"}', 2, 'admin', 1, 'admin', '2021-05-25 16:50:04', '2024-11-07 11:30:53', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(4, 0, 'Xlqig32x/', 1, 1, 'menu.system', '/sys', 60000001, '{"icon":"Setting","isKeepAlive":true,"redirect":"/sys/resources","routeName":"sys"}', 1, 'admin', 1, 'admin', '2021-05-26 15:20:20', '2024-11-07 14:03:22', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(5, 4, 'Xlqig32x/UGxla231/', 1, 1, 'menu.menuPermission', 'resources', 9999998, '{"component":"system/resource/ResourceList","icon":"Menu","isKeepAlive":true,"routeName":"ResourceList"}', 1, 'admin', 1, 'admin', '2021-05-26 15:23:07', '2024-11-07 14:03:31', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(11, 4, 'Xlqig32x/lxqSiae1/', 1, 1, 'menu.role', 'roles', 10000001, '{"component":"system/role/RoleList","icon":"Menu","isKeepAlive":true,"routeName":"RoleList"}', 1, 'admin', 1, 'admin', '2021-05-27 11:15:35', '2024-11-07 14:12:40', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(12, 3, '12sSjal1/lskeiql1/Alw1Xkq3/', 2, 1, 'menu.machineTerminal', 'machine:terminal', 40000000, 'null', 1, 'admin', 1, 'admin', '2021-05-28 14:06:02', '2024-11-07 11:54:29', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(14, 4, 'Xlqig32x/sfslfel/', 1, 1, 'menu.account', 'accounts', 9999999, '{"component":"system/account/AccountList","icon":"Menu","isKeepAlive":true,"routeName":"AccountList"}', 1, 'admin', 1, 'admin', '2021-05-28 14:56:25', '2024-11-07 14:11:08', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(15, 3, '12sSjal1/lskeiql1/Lsew24Kx/', 2, 1, 'menu.machineFileConf', 'machine:file', 50000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 17:44:37', '2024-11-07 11:54:40', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(16, 3, '12sSjal1/lskeiql1/exIsqL31/', 2, 1, 'menu.machineCreate', 'machine:add', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 17:46:11', '2024-11-07 11:53:52', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(17, 3, '12sSjal1/lskeiql1/Liwakg2x/', 2, 1, 'menu.machineEdit', 'machine:update', 20000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 17:46:23', '2024-11-07 11:54:07', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(18, 3, '12sSjal1/lskeiql1/Lieakenx/', 2, 1, 'menu.machineDelete', 'machine:del', 30000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 17:46:36', '2024-11-07 11:54:17', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(19, 14, 'Xlqig32x/sfslfel/UUiex2xA/', 2, 1, 'menu.accountRoleAllocation', 'account:saveRoles', 50000001, 'null', 1, 'admin', 1, 'admin', '2021-05-31 17:50:51', '2024-11-07 14:12:26', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(20, 11, 'Xlqig32x/lxqSiae1/EMq2Kxq3/', 2, 1, 'menu.roleMenuPermissionAllocation', 'role:saveResources', 40000002, 'null', 1, 'admin', 1, 'admin', '2021-05-31 17:51:41', '2024-11-07 14:13:47', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(21, 14, 'Xlqig32x/sfslfel/Uexax2xA/', 2, 1, 'menu.accountDelete', 'account:del', 20000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:02:01', '2024-11-07 14:12:05', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(22, 11, 'Xlqig32x/lxqSiae1/Elxq2Kxq3/', 2, 1, 'menu.roleDelete', 'role:del', 40000001, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:02:29', '2024-11-07 14:13:38', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(23, 11, 'Xlqig32x/lxqSiae1/342xKxq3/', 2, 1, 'menu.roleAdd', 'role:add', 19999999, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:02:44', '2024-11-07 14:13:14', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(24, 11, 'Xlqig32x/lxqSiae1/LexqKxq3/', 2, 1, 'menu.roleEdit', 'role:update', 40000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:02:57', '2024-11-07 14:13:26', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(25, 5, 'Xlqig32x/UGxla231/Elxq23XK/', 2, 1, 'menu.menuPermissionAdd', 'resource:add', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:03:33', '2024-11-07 14:03:44', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(26, 5, 'Xlqig32x/UGxla231/eloq23XK/', 2, 1, 'menu.menuPermissionDelete', 'resource:delete', 30000001, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:03:47', '2024-11-07 14:04:19', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(27, 5, 'Xlqig32x/UGxla231/JExq23XK/', 2, 1, 'menu.menuPermissionEdit', 'resource:update', 30000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:04:03', '2024-11-07 14:04:10', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(28, 5, 'Xlqig32x/UGxla231/Elex13XK/', 2, 1, 'menu.menuPermissionEnableDisable', 'resource:changeStatus', 40000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 18:04:33', '2024-11-07 14:04:53', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(29, 14, 'Xlqig32x/sfslfel/xlawx2xA/', 2, 1, 'menu.accountAdd', 'account:add', 19999999, 'null', 1, 'admin', 1, 'admin', '2021-05-31 19:23:42', '2024-11-07 14:11:46', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(30, 14, 'Xlqig32x/sfslfel/32xax2xA/', 2, 1, 'menu.accountEdit', 'account:update', 19999999, 'null', 1, 'admin', 1, 'admin', '2021-05-31 19:23:58', '2024-11-07 14:11:56', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(31, 14, 'Xlqig32x/sfslfel/eubale13/', 2, 1, 'menu.accountBase', 'account', 9999999, 'null', 1, 'admin', 1, 'admin', '2021-05-31 21:25:06', '2024-11-07 14:11:27', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(32, 5, 'Xlqig32x/UGxla231/321q23XK/', 2, 1, 'menu.menuPermissionBase', 'resource', 9999999, 'null', 1, 'admin', 1, 'admin', '2021-05-31 21:25:25', '2024-11-07 14:03:59', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(33, 11, 'Xlqig32x/lxqSiae1/908xKxq3/', 2, 1, 'menu.roleBase', 'role', 9999999, 'null', 1, 'admin', 1, 'admin', '2021-05-31 21:25:40', '2024-11-07 14:13:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(34, 14, 'Xlqig32x/sfslfel/32alx2xA/', 2, 1, 'menu.accountEnableDisable', 'account:changeStatus', 50000000, 'null', 1, 'admin', 1, 'admin', '2021-05-31 21:29:48', '2024-11-07 14:12:17', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(36, 0, 'dbms23ax/', 1, 1, 'menu.dbms', '/dbms', 49999999, '{"icon":"Coin","isKeepAlive":true,"routeName":"DBMS"}', 1, 'admin', 1, 'admin', '2021-06-01 14:01:33', '2024-11-07 13:43:14', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(37, 3, '12sSjal1/lskeiql1/Keiqkx4L/', 2, 1, 'menu.machineFileConfCreate', 'machine:addFile', 60000000, 'null', 1, 'admin', 1, 'admin', '2021-06-01 19:54:23', '2024-11-07 12:02:41', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(38, 36, 'dbms23ax/exaeca2x/', 1, 1, 'menu.dbDataOp', 'sql-exec', 10000000, '{"component":"ops/db/SqlExec","icon":"Coin","isKeepAlive":true,"routeName":"SqlExec"}', 1, 'admin', 1, 'admin', '2021-06-03 09:09:29', '2024-11-07 13:43:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(39, 0, 'sl3as23x/', 1, 1, 'menu.personalCenter', '/personal', 19999999, '{"component":"personal/index","icon":"UserFilled","isHide":true,"isKeepAlive":true,"routeName":"Personal"}', 1, 'admin', 1, 'admin', '2021-06-03 14:25:35', '2024-11-06 20:55:37', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(40, 3, '12sSjal1/lskeiql1/Keal2Xke/', 2, 1, 'menu.machineFileCreate', 'machine:file:add', 70000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:06:26', '2024-11-07 12:07:17', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(41, 3, '12sSjal1/lskeiql1/Ihfs2xaw/', 2, 1, 'menu.machineFileDelete', 'machine:file:del', 80000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:06:49', '2024-11-07 12:07:38', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(42, 3, '12sSjal1/lskeiql1/3ldkxJDx/', 2, 1, 'menu.machineFileWrite', 'machine:file:write', 90000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:07:27', '2024-11-07 12:07:48', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(43, 3, '12sSjal1/lskeiql1/Ljewix43/', 2, 1, 'menu.machineFileUpload', 'machine:file:upload', 100000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:07:42', '2024-11-07 12:08:00', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(44, 3, '12sSjal1/lskeiql1/L12wix43/', 2, 1, 'menu.machineFileConfDelete', 'machine:file:rm', 69999999, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:08:12', '2024-11-07 12:08:17', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(45, 3, '12sSjal1/lskeiql1/Ljewisd3/', 2, 1, 'menu.machineScriptSave', 'machine:script:save', 120000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:09:01', '2024-11-07 12:17:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(46, 3, '12sSjal1/lskeiql1/Ljeew43/', 2, 1, 'menu.machineScriptDelete', 'machine:script:del', 130000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:09:27', '2024-11-07 12:17:13', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(47, 3, '12sSjal1/lskeiql1/ODewix43/', 2, 1, 'menu.machineScriptRun', 'machine:script:run', 140000000, 'null', 1, 'admin', 1, 'admin', '2021-06-08 11:09:50', '2024-11-07 12:17:24', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(54, 135, 'dbms23ax/X0f4BxT0/leix3Axl/', 2, 1, 'menu.dbSave', 'db:save', 1693041086, 'null', 1, 'admin', 1, 'admin', '2021-07-08 17:30:36', '2024-11-07 13:45:53', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(55, 135, 'dbms23ax/X0f4BxT0/ygjL3sxA/', 2, 1, 'menu.dbDelete', 'db:del', 1693041086, 'null', 1, 'admin', 1, 'admin', '2021-07-08 17:30:48', '2024-11-07 13:46:06', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(57, 3, '12sSjal1/lskeiql1/OJewex43/', 2, 1, 'menu.machineBase', 'machine', 9999999, 'null', 1, 'admin', 1, 'admin', '2021-07-09 10:48:02', '2024-11-07 11:53:55', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(58, 135, 'dbms23ax/X0f4BxT0/AceXe321/', 2, 1, 'menu.dbBase', 'db', 1693041085, 'null', 1, 'admin', 1, 'admin', '2021-07-09 10:48:22', '2024-11-07 13:45:25', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(59, 38, 'dbms23ax/exaeca2x/ealcia23/', 2, 1, 'menu.dbDataOpBase', 'db:exec', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-07-09 10:50:13', '2024-11-07 13:43:31', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(60, 0, 'RedisXq4/', 1, 1, 'menu.redis', '/redis', 50000001, '{"icon":"iconfont icon-redis","isKeepAlive":true,"routeName":"RDS"}', 1, 'admin', 1, 'admin', '2021-07-19 20:15:41', '2024-11-07 13:57:51', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(61, 60, 'RedisXq4/Exitx4al/', 1, 1, 'menu.redisDataOp', 'data-operation', 10000000, '{"component":"ops/redis/DataOperation","icon":"iconfont icon-redis","isKeepAlive":true,"routeName":"DataOperation"}', 1, 'admin', 1, 'admin', '2021-07-19 20:17:29', '2024-11-07 13:58:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(62, 61, 'RedisXq4/Exitx4al/LSjie321/', 2, 1, 'menu.redisDataOpBase', 'redis:data', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-07-19 20:18:54', '2024-11-07 13:58:12', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(63, 60, 'RedisXq4/Eoaljc12/', 1, 1, 'menu.redisManage', 'manage', 20000000, '{"component":"ops/redis/RedisList","icon":"iconfont icon-redis","isKeepAlive":true,"routeName":"RedisList"}', 1, 'admin', 1, 'admin', '2021-07-20 10:48:04', '2024-11-07 13:58:52', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(64, 63, 'RedisXq4/Eoaljc12/IoxqAd31/', 2, 1, 'menu.redisManageBase', 'redis:manage', 10000000, 'null', 1, 'admin', 1, 'admin', '2021-07-20 10:48:26', '2024-11-07 13:59:03', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(71, 61, 'RedisXq4/Exitx4al/IUlxia23/', 2, 1, 'menu.redisDataOpSave', 'redis:data:save', 29999999, 'null', 1, 'admin', 1, 'admin', '2021-08-17 11:20:37', '2024-11-07 13:58:24', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(72, 3, '12sSjal1/lskeiql1/LIEwix43/', 2, 1, 'menu.machineKillprocess', 'machine:killprocess', 49999999, 'null', 1, 'admin', 1, 'admin', '2021-08-17 11:20:37', '2024-11-07 12:03:00', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(79, 0, 'Mongo452/', 1, 1, 'menu.mongo', '/mongo', 50000002, '{"icon":"iconfont icon-mongo","isKeepAlive":true,"routeName":"Mongo"}', 1, 'admin', 1, 'admin', '2022-05-13 14:00:41', '2024-11-07 13:59:12', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(80, 79, 'Mongo452/eggago31/', 1, 1, 'menu.mongoDataOp', 'mongo-data-operation', 10000000, '{"component":"ops/mongo/MongoDataOp","icon":"iconfont icon-mongo","isKeepAlive":true,"routeName":"MongoDataOp"}', 1, 'admin', 1, 'admin', '2022-05-13 14:03:58', '2024-11-07 13:59:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(81, 80, 'Mongo452/eggago31/egjglal3/', 2, 1, 'menu.mongoDataOpBase', 'mongo:base', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-05-13 14:04:16', '2024-11-07 13:59:32', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(82, 79, 'Mongo452/ghxagl43/', 1, 1, 'menu.mongoManage', 'mongo-manage', 20000000, '{"component":"ops/mongo/MongoList","icon":"iconfont icon-mongo","isKeepAlive":true,"routeName":"MongoList"}', 1, 'admin', 1, 'admin', '2022-05-16 18:13:06', '2024-11-07 14:00:23', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(83, 82, 'Mongo452/ghxagl43/egljbla3/', 2, 1, 'menu.mongoManageBase', 'mongo:manage:base', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-05-16 18:13:25', '2024-11-07 14:00:35', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(84, 4, 'Xlqig32x/exlaeAlx/', 1, 1, 'menu.opLog', 'syslogs', 20000000, '{"component":"system/syslog/SyslogList","icon":"Tickets","routeName":"SyslogList"}', 1, 'admin', 1, 'admin', '2022-07-13 19:57:07', '2024-11-07 14:15:09', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(85, 84, 'Xlqig32x/exlaeAlx/3xlqeXql/', 2, 1, 'menu.opLogBase', 'syslog', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-07-13 19:57:55', '2024-11-07 14:15:19', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(87, 4, 'Xlqig32x/Ulxaee23/', 1, 1, 'menu.sysConf', 'configs', 10000002, '{"component":"system/config/ConfigList","icon":"Setting","isKeepAlive":true,"routeName":"ConfigList"}', 1, 'admin', 1, 'admin', '2022-08-25 22:18:55', '2024-11-07 14:14:27', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(88, 87, 'Xlqig32x/Ulxaee23/exlqguA3/', 2, 1, 'menu.sysConfBase', 'config:base', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-08-25 22:19:35', '2024-11-07 14:14:48', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(93, 0, 'Tag3fhad/', 1, 1, 'menu.tag', '/tag', 20000001, '{"icon":"CollectionTag","isKeepAlive":true,"routeName":"Tag"}', 1, 'admin', 1, 'admin', '2022-10-24 15:18:40', '2024-11-07 08:45:41', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(94, 93, 'Tag3fhad/glxajg23/', 1, 1, 'menu.tagTree', 'tag-trees', 10000000, '{"component":"ops/tag/TagTreeList","icon":"CollectionTag","isKeepAlive":true,"routeName":"TagTreeList"}', 1, 'admin', 1, 'admin', '2022-10-24 15:19:40', '2024-11-07 09:46:57', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(95, 93, 'Tag3fhad/Bjlag32x/', 1, 1, 'menu.team', 'teams', 20000000, '{"component":"ops/tag/TeamList","icon":"UserFilled","isKeepAlive":true,"routeName":"TeamList"}', 1, 'admin', 1, 'admin', '2022-10-24 15:20:09', '2024-11-07 11:24:34', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(96, 94, 'Tag3fhad/glxajg23/gkxagt23/', 2, 1, 'menu.tagSave', 'tag:save', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-10-24 15:20:40', '2024-11-07 11:22:08', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(97, 95, 'Tag3fhad/Bjlag32x/GJslag32/', 2, 1, 'menu.teamSave', 'team:save', 10000000, 'null', 1, 'admin', 1, 'admin', '2022-10-24 15:20:57', '2024-11-07 11:24:43', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(98, 94, 'Tag3fhad/glxajg23/xjgalte2/', 2, 1, 'menu.tagDelete', 'tag:del', 20000000, 'null', 1, 'admin', 1, 'admin', '2022-10-26 13:58:47', '2024-11-07 11:22:16', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(99, 95, 'Tag3fhad/Bjlag32x/Gguca23x/', 2, 1, 'menu.teamDelete', 'team:del', 20000000, 'null', 1, 'admin', 1, 'admin', '2022-10-26 13:59:06', '2024-11-07 11:24:54', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(100, 95, 'Tag3fhad/Bjlag32x/Lgidsq32/', 2, 1, 'menu.teamMemberAdd', 'team:member:save', 30000000, 'null', 1, 'admin', 1, 'admin', '2022-10-26 13:59:27', '2024-11-07 11:25:43', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(101, 95, 'Tag3fhad/Bjlag32x/Lixaue3G/', 2, 1, 'menu.teamMemberDelete', 'team:member:del', 40000000, 'null', 1, 'admin', 1, 'admin', '2022-10-26 13:59:43', '2024-11-07 11:25:54', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(102, 95, 'Tag3fhad/Bjlag32x/Oygsq3xg/', 2, 1, 'menu.teamTagSave', 'team:tag:save', 50000000, 'null', 1, 'admin', 1, 'admin', '2022-10-26 13:59:57', '2024-11-07 11:26:09', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(103, 93, 'Tag3fhad/exahgl32/', 1, 1, 'menu.authorization', 'authcerts', 19999999, '{"component":"ops/tag/AuthCertList","icon":"Ticket","isKeepAlive":true,"routeName":"AuthCertList"}', 1, 'admin', 1, 'admin', '2023-02-23 11:36:26', '2024-11-07 09:47:42', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(104, 103, 'Tag3fhad/exahgl32/egxahg24/', 2, 1, 'menu.authorizationBase', 'authcert', 10000000, 'null', 1, 'admin', 1, 'admin', '2023-02-23 11:37:24', '2024-11-07 11:23:58', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(105, 103, 'Tag3fhad/exahgl32/yglxahg2/', 2, 1, 'menu.authorizationSave', 'authcert:save', 20000000, 'null', 1, 'admin', 1, 'admin', '2023-02-23 11:37:54', '2024-11-07 11:24:11', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(106, 103, 'Tag3fhad/exahgl32/Glxag234/', 2, 1, 'menu.authorizationDelete', 'authcert:del', 30000000, 'null', 1, 'admin', 1, 'admin', '2023-02-23 11:38:09', '2024-11-07 11:24:21', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(108, 61, 'RedisXq4/Exitx4al/Gxlagheg/', 2, 1, 'menu.redisDataOpDelete', 'redis:data:del', 30000000, 'null', 1, 'admin', 1, 'admin', '2023-03-14 17:20:00', '2024-11-07 13:58:32', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(128, 87, 'Xlqig32x/Ulxaee23/MoOWr2N0/', 2, 1, 'menu.sysConfSave', 'config:save', 1687315135, 'null', 1, 'admin', 1, 'admin', '2023-06-21 10:38:55', '2024-11-07 14:14:59', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(130, 2, '12sSjal1/W9XKiabq/', 1, 1, 'menu.machineCronJob', '/machine/cron-job', 1689646396, '{"component":"ops/machine/cronjob/CronJobList","icon":"AlarmClock","isKeepAlive":true,"routeName":"CronJobList"}', 1, 'admin', 1, 'admin', '2023-07-18 10:13:16', '2024-11-07 12:17:39', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(131, 130, '12sSjal1/W9XKiabq/gEOqr2pD/', 2, 1, 'menu.machineCronJobSvae', 'machine:cronjob:save', 1689860087, 'null', 1, 'admin', 1, 'admin', '2023-07-20 21:34:47', '2024-11-07 12:17:48', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(132, 130, '12sSjal1/W9XKiabq/zxXM23i0/', 2, 1, 'menu.machineCronJobDelete', 'machine:cronjob:del', 1689860102, 'null', 1, 'admin', 1, 'admin', '2023-07-20 21:35:02', '2024-11-07 12:18:01', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(133, 80, 'Mongo452/eggago31/xvpKk36u/', 2, 1, 'menu.mongoDataOpSave', 'mongo:data:save', 1692674943, 'null', 1, 'admin', 1, 'admin', '2023-08-22 11:29:04', '2024-11-07 13:59:41', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(134, 80, 'Mongo452/eggago31/3sblw1Wb/', 2, 1, 'menu.mongoDataOpDelete', 'mongo:data:del', 1692674964, 'null', 1, 'admin', 1, 'admin', '2023-08-22 11:29:24', '2024-11-07 14:00:00', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(135, 36, 'dbms23ax/X0f4BxT0/', 1, 1, 'menu.dbInstance', 'instances', 1693040706, '{"component":"ops/db/InstanceList","icon":"Coin","isKeepAlive":true,"routeName":"InstanceList"}', 1, 'admin', 1, 'admin', '2023-08-26 09:05:07', '2024-11-07 13:43:59', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(136, 135, 'dbms23ax/X0f4BxT0/D23fUiBr/', 2, 1, 'menu.dbInstanceSave', 'db:instance:save', 1693041001, 'null', 1, 'admin', 1, 'admin', '2023-08-26 09:10:02', '2024-11-07 13:44:47', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(137, 135, 'dbms23ax/X0f4BxT0/mJlBeTCs/', 2, 1, 'menu.dbInstanceBase', 'db:instance', 1693041000, 'null', 1, 'admin', 1, 'admin', '2023-08-26 09:10:55', '2024-11-07 13:44:29', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(138, 135, 'dbms23ax/X0f4BxT0/Sgg8uPwz/', 2, 1, 'menu.dbInstanceDelete', 'db:instance:del', 1693041084, 'null', 1, 'admin', 1, 'admin', '2023-08-26 09:11:24', '2024-11-07 13:44:56', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(150, 36, 'Jra0n7De/', 1, 1, 'menu.dbDataSync', 'sync', 1693040707, '{"component":"ops/db/SyncTaskList","icon":"Coin","isKeepAlive":true,"routeName":"SyncTaskList"}', 12, 'liuzongyang', 1, 'admin', '2023-12-22 09:51:34', '2024-11-07 13:46:26', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(151, 150, 'Jra0n7De/uAnHZxEV/', 2, 1, 'menu.dbDataSync', 'db:sync', 1703641202, 'null', 12, 'liuzongyang', 1, 'admin', '2023-12-27 09:40:02', '2024-11-07 13:46:37', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(152, 150, 'Jra0n7De/zvAMo2vk/', 2, 1, 'menu.dbDataSyncSave', 'db:sync:save', 1703641320, 'null', 12, 'liuzongyang', 1, 'admin', '2023-12-27 09:42:00', '2024-11-07 13:46:54', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(153, 150, 'Jra0n7De/pLOA2UYz/', 2, 1, 'menu.dbDataSyncDelete', 'db:sync:del', 1703641342, 'null', 12, 'liuzongyang', 1, 'admin', '2023-12-27 09:42:22', '2024-11-07 13:47:06', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(154, 150, 'Jra0n7De/VBt68CDx/', 2, 1, 'menu.dbDataSyncChangeStatus', 'db:sync:status', 1703641364, 'null', 12, 'liuzongyang', 1, 'admin', '2023-12-27 09:42:45', '2024-11-07 13:47:17', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(155, 150, 'Jra0n7De/PigmSGVg/', 2, 1, 'menu.dbDataSyncLog', 'db:sync:log', 1704266866, 'null', 12, 'liuzongyang', 1, 'admin', '2024-01-03 15:27:47', '2024-11-07 13:47:28', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1707206386, 2, 'PDPt6217/', 1, 1, 'menu.machineOp', 'machines-op', 1, '{"component":"ops/machine/MachineOp","icon":"Monitor","isKeepAlive":true,"routeName":"MachineOp"}', 12, 'liuzongyang', 1, 'admin', '2024-02-06 15:59:46', '2024-11-07 11:29:21', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1707206421, 1707206386, 'PDPt6217/kQXTYvuM/', 2, 1, 'menu.machineOpBase', 'machine-op', 1707206421, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-06 16:00:22', '2024-11-07 11:30:41', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1708910975, 0, '6egfEVYr/', 1, 1, 'menu.flow', '/flow', 60000000, '{"icon":"List","isKeepAlive":true,"routeName":"flow"}', 1, 'admin', 1, 'admin', '2024-02-26 09:29:36', '2024-11-07 14:01:27', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1708911264, 1708910975, '6egfEVYr/fw0Hhvye/', 1, 1, 'menu.flowProcDef', 'procdefs', 1708911264, '{"component":"flow/ProcdefList","icon":"List","isKeepAlive":true,"routeName":"ProcdefList"}', 1, 'admin', 1, 'admin', '2024-02-26 09:34:24', '2024-11-07 14:01:59', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709045735, 1708910975, '6egfEVYr/3r3hHEub/', 1, 1, 'menu.myTask', 'procinst-tasks', 1708911263, '{"component":"flow/ProcinstTaskList","icon":"Tickets","isKeepAlive":true,"routeName":"ProcinstTaskList"}', 1, 'admin', 1, 'admin', '2024-02-27 22:55:35', '2024-11-07 14:01:39', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709103180, 1708910975, '6egfEVYr/oNCIbynR/', 1, 1, 'menu.myFlow', 'procinsts', 1708911263, '{"component":"flow/ProcinstList","icon":"Tickets","isKeepAlive":true,"routeName":"ProcinstList"}', 1, 'admin', 1, 'admin', '2024-02-28 14:53:00', '2024-11-07 14:01:48', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709194669, 36, 'SmLcpu6c/', 1, 1, 'menu.dbTransfer', 'transfer', 1709194669, '{"component":"ops/db/DbTransferList","icon":"Switch","isKeepAlive":true,"routeName":"DbTransferList"}', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:17:50', '2024-11-07 13:47:44', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709194694, 1709194669, 'SmLcpu6c/A9vAm4J8/', 2, 1, 'menu.dbTransferBase', 'db:transfer', 1709194694, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:18:14', '2024-11-07 13:47:55', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709196697, 1709194669, 'SmLcpu6c/5oJwPzNb/', 2, 1, 'menu.dbTransferSave', 'db:transfer:save', 1709196697, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:51:37', '2024-11-07 13:48:06', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709196707, 1709194669, 'SmLcpu6c/L3ybnAEW/', 2, 1, 'menu.dbTransferDelete', 'db:transfer:del', 1709196707, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:51:47', '2024-11-07 13:48:21', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709196723, 1709194669, 'SmLcpu6c/hGiLN1VT/', 2, 1, 'menu.dbTransferChangeStatus', 'db:transfer:status', 1709196723, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:52:04', '2024-11-07 13:49:01', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709196737, 1709194669, 'SmLcpu6c/CZhNIbWg/', 2, 1, 'menu.dbTransferRunLog', 'db:transfer:log', 1709196737, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:52:17', '2024-11-07 13:49:26', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709196755, 1709194669, 'SmLcpu6c/b6yHt6V2/', 2, 1, 'menu.dbTransferRun', 'db:transfer:run', 1709196736, 'null', 12, 'liuzongyang', 1, 'admin', '2024-02-29 16:52:36', '2024-11-07 13:49:15', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709208339, 1708911264, '6egfEVYr/fw0Hhvye/r9ZMTHqC/', 2, 1, 'menu.flowProcDefSave', 'flow:procdef:save', 1709208339, 'null', 1, 'admin', 1, 'admin', '2024-02-29 20:05:40', '2024-11-07 14:02:10', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1709208354, 1708911264, '6egfEVYr/fw0Hhvye/b4cNf3iq/', 2, 1, 'menu.flowProcDefDelete', 'flow:procdef:del', 1709208354, 'null', 1, 'admin', 1, 'admin', '2024-02-29 20:05:54', '2024-11-07 14:03:07', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1712717290, 0, 'tLb8TKLB/', 1, 1, 'menu.noPagePermission', 'empty', 60000002, '{"component":"empty","icon":"Menu","isHide":true,"isKeepAlive":true,"routeName":"empty"}', 1, 'admin', 1, 'admin', '2024-04-10 10:48:10', '2024-11-07 14:15:31', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1712717337, 1712717290, 'tLb8TKLB/m2abQkA8/', 2, 1, 'menu.authcertShowciphertext', 'authcert:showciphertext', 1712717337, 'null', 1, 'admin', 1, 'admin', '2024-04-10 10:48:58', '2024-11-07 14:15:40', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1713875842, 2, '12sSjal1/UnWIUhW0/', 1, 1, 'menu.machineSecurityConfig', 'security', 1713875842, '{"component":"ops/machine/security/SecurityConfList","icon":"Setting","isKeepAlive":true,"routeName":"SecurityConfList"}', 1, 'admin', 1, 'admin', '2024-04-23 20:37:22', '2024-11-07 12:18:13', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1714031981, 1713875842, '12sSjal1/UnWIUhW0/tEzIKecl/', 2, 1, 'menu.machineSecurityCmdSvae', 'cmdconf:save', 1714031981, 'null', 1, 'admin', 1, 'admin', '2024-04-25 15:59:41', '2024-11-07 12:18:22', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1714032002, 1713875842, '12sSjal1/UnWIUhW0/0tJwC3Gf/', 2, 1, 'menu.machineSecurityCmdDelete', 'cmdconf:del', 1714032002, 'null', 1, 'admin', 1, 'admin', '2024-04-25 16:00:02', '2024-11-07 12:18:33', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1724376022, 1709194669, 'SmLcpu6c/HIURtJJA/', 2, 1, 'menu.dbTransferFileDelete', 'db:transfer:files:del', 1724376022, 'null', 12, 'liuzongyang', 1, 'admin', '2024-08-23 09:20:23', '2024-11-07 13:49:39', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1724395850, 1709194669, 'SmLcpu6c/FmqK4azt/', 2, 1, 'menu.dbTransferFileDownload', 'db:transfer:files:down', 1724395850, 'null', 12, 'liuzongyang', 1, 'admin', '2024-08-23 14:50:51', '2024-11-07 13:49:58', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1724398262, 1709194669, 'SmLcpu6c/btVtrbhk/', 2, 1, 'menu.dbTransferFileShow', 'db:transfer:files', 1724376021, 'null', 12, 'liuzongyang', 1, 'admin', '2024-08-23 15:31:02', '2024-11-07 13:51:32', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1724998419, 1709194669, 'SmLcpu6c/qINungml/', 2, 1, 'menu.dbTransferFileRun', 'db:transfer:files:run', 1724998419, 'null', 12, 'liuzongyang', 1, 'admin', '2024-08-30 14:13:39', '2024-11-07 13:50:07', 0, NULL);
|
||||
INSERT INTO `t_sys_resource` (`id`, `pid`, `ui_path`, `type`, `status`, `name`, `code`, `weight`, `meta`, `creator_id`, `creator`, `modifier_id`, `modifier`, `create_time`, `update_time`, `is_deleted`, `delete_time`) values(1729668131, 38, 'dbms23ax/exaeca2x/TGFPA3Ez/', 2, 1, 'menu.dbDataOpSqlScriptRun', 'db:sqlscript:run', 1729668131, 'null', 1, 'admin', 1, 'admin', '2024-10-23 15:22:12', '2024-11-07 13:43:46', 0, NULL);
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
UPDATE `t_tag_tree` SET type = 5 WHERE type = 21 or type = 11;
|
||||
UPDATE `t_tag_tree` SET code_path = REPLACE(code_path, '/11|', '/5|') WHERE type = 5;
|
||||
UPDATE `t_tag_tree` SET code_path = REPLACE(code_path, '/21|', '/5|') WHERE type = 5 or type = 22;
|
||||
@@ -1,8 +0,0 @@
|
||||
ALTER TABLE `t_machine`
|
||||
ADD COLUMN `extra` varchar(200) NULL comment '额外信息';
|
||||
|
||||
update t_sys_resource set meta='{"component":"system/role/RoleList","icon":"icon menu/role","isKeepAlive":true,"routeName":"RoleList"}' where id=11;
|
||||
update t_sys_resource set meta='{"component":"system/account/AccountList","icon":"User","isKeepAlive":true,"routeName":"AccountList"}' where id=14;
|
||||
update t_sys_resource set meta='{"component":"ops/db/SyncTaskList","icon":"Refresh","isKeepAlive":true,"routeName":"SyncTaskList"}' where id=150;
|
||||
update t_sys_resource set '{"icon":"icon redis/redis","isKeepAlive":true,"routeName":"RDS"}' where id=60;
|
||||
update t_sys_resource set '{"icon":"icon mongo/mongo","isKeepAlive":true,"routeName":"Mongo"}' where id=79;
|
||||
Reference in New Issue
Block a user