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

使用utf8mb4作为默认字符集 #305

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

k9yyy
Copy link

@k9yyy k9yyy commented Oct 23, 2019

希望数据库后端使用utf8mb4作为默认字符集,以便支持Emoji等。

修改的内容:

  • install/database.sql中将所有表的默认字符集都设为utf8mb4,删除了列单独设置的字符集(沿用自动应该更好维护,万一要修改可以直接改表的默认字符集,不用把单独这些列另外改过来);
  • 因为更新用的SQL内容较多,写到php里看起来太长,所以加入了update/migrate_utf8mb4.sql,用于将旧的表和设置了字符集的列全都改成用utf8mb4字符集;
  • install/index.php中读取SQL文件的函数移动到了library/PDO.class.php中,这样在update/index.php中也可以用它读取SQL文件;
  • 最低MySQL版本需要提升至5.5.3。

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

Successfully merging this pull request may close these issues.

1 participant