dm icon indicating copy to clipboard operation
dm copied to clipboard

block-allow-list: do-tables and ignore-tables can't work together

Open Jingyuma opened this issue 3 years ago • 0 comments

Feature Request

Is your feature request related to a problem? Please describe:

block-allow-list:
  ba-rule-1:                         # 规则名称
    do-dbs: ["test"]     # 迁移哪些库
    do-tables:                       # 迁移哪些表
    - db-name: "test"
      tbl-name: "~^test_table.*"
    ignore-tables:                   # 忽略哪些表
    - db-name: "test"
      tbl-name: "test_table_ignore"

The customer need to do shard table migration, they don't have naming standard, they also need to create this kind of table in the source in the future. So the best way is to only ignore the table: test_table_ignore. But currently, if do-tables and ignore-tables exists in the same time, only do-tables could work, the customer need to write a very complex do-tables rules, and it's very hard to maintaince.

Describe the feature you'd like:

make the do-tables and ignore-tables work together.

Describe alternatives you've considered:

Or there is regexp syntax ~^test_table((?!ignore).)* could do same task, but the lib regexp from Golang we used doesn't support this syntax.

Teachability, Documentation, Adoption, Migration Strategy:

Jingyuma avatar Jun 24 '21 03:06 Jingyuma