-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
struct_migrate_task.toml
108 lines (101 loc) · 3.94 KB
/
struct_migrate_task.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
task-name = "smt_33to45"
datasource-name-s = "o11024"
datasource-name-t = "test08"
comment = "测试数据源"
[struct-migrate-param]
migrate-thread = 10
create-if-not-exist = true
enable-direct-create = true
enable-checkpoint = true
# calltimeout,单位:秒
call-timeout = 36000
[case-field-rule]
# 控制配置文件内所有 *-s 参数配置值(default-value-s 除外)以及 column-route-rules 中的 key 值
# 1,参数值是 0 代表以当前配置文件为准,与源端对比
# 2,参数值是 1 代表统一转换值为小写,与源端对比,default-value-s 参数配置始终以参数配置大小为准与源端对比
# 3,参数值是 2 代表统一转换值为大写,与源端对比,default-value-s 参数配置始终以参数配置大小为准与源端对比
case-field-rule-s = "0"
# 控制配置文件 schema-name-t、table-name-t 以及 column-route-rules 中的 value 值,、column-type-t/table-attrs-t 不受控制默认大写
# 1,参数值是 0 代表统一转换数据库名、表名、字段名值以当前配置文件为准,非配置文件配置的以上游为准
# 2,参数值是 1 代表统一转换数据库名、表名、字段名值为小写,default-value-t 参数配置始终以参数配置大小为准与源端对比
# 3,参数值是 2 代表统一转换数据库名、表名、字段名值为大写,default-value-t 参数配置始终以参数配置大小为准与源端对比
case-field-rule-t = "0"
[schema-route-rule]
schema-name-s = "SCOTT"
schema-name-t = "MARVIN"
# include-table-s 迁移所有表需指定 *,特定表写具体表名
include-table-s = ["*"]
exclude-table-s = []
# sequence 设置空代表不迁移 sequence
include-sequence-s = []
exclude-sequence-s = []
[[schema-route-rule.table-route-rules]]
table-name-s = "MARVIN00"
table-name-t = "STEVEN00"
column-route-rules = {"NAME" = "T_NAME00"}
[[schema-route-rule.table-route-rules]]
table-name-s = "MARVIN01"
table-name-t = "STEVEN01"
column-route-rules = {"NAME" = "t_name00"}
# 默认值规则设置分为字符类型 OR 数值类型 OR 函数表达式 OR '' 空字符串 OR NULL 字符
# 字符类型设置需要带单引号
# 数值类型以及函数表达式设置保持本身即可
# 对于 N01 VARCHAR2(10) DEFAULT '' 设置映射,以 '' 设置代替
# 对于 N01 VARCHAR2(10) DEFAULT 'Null' 设置映射,以 'Null' 设置代替
# 对于 N01 VARCHAR2(10) DEFAULT NULL 设置 NULL 映射,以 NULL 设置代替
# 对于 N01 VARCHAR2(10) 字段设置 NULL 映射,以 NULLSTRING 设置代替
[struct-migrate-rule]
[[struct-migrate-rule.task-struct-rules]]
column-type-s = "NUMBER(38)"
column-type-t = "BIGINT"
default-value-s = "5"
default-value-t = "10"
[[struct-migrate-rule.schema-struct-rules]]
schema-name-s = "MARVIN"
column-type-s = "NUMBER"
column-type-t = "BIGINT"
default-value-s = ""
default-value-t = ""
[[struct-migrate-rule.table-struct-rules]]
schema-name-s = "MARVIN"
table-name-s = "MARVIN00"
column-type-s = "NUMBER"
column-type-t = "BIGINT(20)"
default-value-s = "'pw'"
default-value-t = "'pc'"
[[struct-migrate-rule.column-struct-rules]]
schema-name-s = "MARVIN"
table-name-s = "MARVIN00"
column-name-s = "ID"
column-type-s = "NUMBER"
column-type-t = "INT"
default-value-s = ""
default-value-t = ""
[[struct-migrate-rule.column-struct-rules]]
schema-name-s = "MARVIN"
table-name-s = "MARVIN01"
column-name-s = "XF"
column-type-s = ""
column-type-t = ""
default-value-s = "''"
default-value-t = "'STRING'"
[[struct-migrate-rule.column-struct-rules]]
schema-name-s = "MARVIN"
table-name-s = "MARVIN01"
column-name-s = "XFO"
column-type-s = ""
column-type-t = ""
default-value-s = "NULLSTRING"
default-value-t = "'pingcap'"
[[struct-migrate-rule.column-struct-rules]]
schema-name-s = "MARVIN"
table-name-s = "MARVIN01"
column-name-s = "XFT"
column-type-s = ""
column-type-t = ""
default-value-s = "NULL"
default-value-t = "'marvin'"
[[struct-migrate-rule.table-attrs-rules]]
schema-name-s = "MARVIN"
table-names-s = ["MARVIN05"]
table-attrs-t = "shard_row_id_bits=6"