Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表同步后,表字符集的 COLLATE 不一致 #71

Open
Urnotprepared opened this issue Jun 28, 2023 · 4 comments
Open

表同步后,表字符集的 COLLATE 不一致 #71

Urnotprepared opened this issue Jun 28, 2023 · 4 comments

Comments

@Urnotprepared
Copy link

源 DB 版本 : mysql 5.7
目的 DB 版本: mysql 8.0

在源 DB 上执行:
create table t1 (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID,自增',
num int,
name varchar(10),
PRIMARY KEY (id)
);

这个表的 COLLATE 是 utf8mb4_general_ci

使用 mysql-schema-sync 同步到 目的 DB 后
该表的 COLLATE 变成了 utf8mb4_0900_ai_ci

@ht2324
Copy link

ht2324 commented Jul 10, 2023

5.7和8.0默认的字符集不同吧 应该是兼容的

@Urnotprepared
Copy link
Author

5.7 和 8.0 默认的Collation 确实不一样,但是最终的同步结果应该一致才符合逻辑~

@ht2324
Copy link

ht2324 commented Jul 10, 2023

看代码是没有对比字符集

@hidu
Copy link
Owner

hidu commented Jul 12, 2023

这应该是一个新的 feature。
有时间的话,欢迎提个 pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants