13 Star 100 Fork 29

万里数据库/gt-checksum

需求增加非同名数据库校验参数

意向
Requirement
Opened this issue  
2023-03-07 15:30

1、
./gt-checksum -S type=mysql,user=root,passwd=xxx,host=xxx,port=33057,charset=utf8mb4 -D type=mysql,user=root,passwd=xxx,host=xxx,port=3306,charset=utf8mb4 -t test.*

-t test.* 此参数仅检查两库同为test的数据库,无法实现源库test,目标库为aaa 的校验。
期望增加非同名数据库校验参数;
甚至非同名表甚至非同名字段名的校验(这个可能难度较大)

2、
./gt-checksum -S type=mysql,user=root,passwd=xxx,host=xxx,port=33057,charset=utf8mb4 -D type=mysql,user=root,passwd=xxx,host=xxx,port=3306,charset=utf8mb4 -t test.*

执行时发现仅校验两库同时存在的表,即交集,源库没有或目标库没有的表会自动忽略;

Comments (1)

kevin-wu created需求 2 years ago
GreatSQL added
 
feature
label
2 years ago
Expand operation logs

我实现了一个版本,大概方式是:

  1. 在conf中添加
    srcSchema =
    dstSchema =
    来表示非同名数据库
  2. 配置一个json文件,来表示表和字段的映射
    {
    	"class1:class1lzhu": {
    		"id": "id",
    		"name": "name1"
    	}
    }

目前仅简单测试了struct和data的校验
有需要的同学我可以提供编译好的二进制文件(邮件或私信),顺便可以帮我测试一下,有问题我好及时发现并修改

Sign in to comment

Status
Assignees
Projects
Pull Requests
Successfully merging a pull request will close this issue.
Duration (hours)
Planed to start   -   Planed to end
-
Top level
Priority
Milestones
Branches
参与者(2)
lingheng-lord-lingheng kevin-wu-wukaixiang628
Go
1
https://gitee.com/GreatSQL/gt-checksum.git
git@gitee.com:GreatSQL/gt-checksum.git
GreatSQL
gt-checksum
gt-checksum

Search