bytebase / bytebase

The GitHub/GitLab for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.

Home Page:https://www.bytebase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: table synchronization

wuqinqiang opened this issue · comments

Provide the Bytebase version you are using

bug

Describe the bug

synchronization did not effect

Steps to reproduce

The source library and the target library have a table field as follows

# Original
`bank_card_number` varchar(30) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '银行卡号',

# target
`bank_card_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '银行卡号',

The main difference is that the target table specifies the CHARACTER SET utf8mb4.

Then when using the library table synchronization, there is a difference, ddl is as follows (which is correct)

ALTER TABLE `admin_owners` MODIFY COLUMN `bank_card_number` varchar(30) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '银行卡号';

Then generate the ticket, execute successfully.
截屏2024-04-29 18 23 38

However, when you synchronize the library table again, you will find that there is still a difference, and then the above,

ALTER TABLE `admin_owners` MODIFY COLUMN `bank_card_number` varchar(30) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '银行卡号';

Expected behavior

zero difference

Provide the database you are using

No response

Provide the version control system you are using

No response

Additional context

No response