Files
zkxw/docs/sql/patch_2026-07-17_oa_tables_collation_unicode.sql
T
2026-07-21 15:23:59 +08:00

15 lines
1.0 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- OA 表与 sys_user 等系统表排序规则对齐
-- 问题:oa_* 建表仅写 DEFAULT CHARSET=utf8mb4,MySQL 5.7 默认 utf8mb4_general_ci;
-- sys_user.id 等为 utf8mb4_unicode_ci,JOIN 报 1267 Illegal mix of collations。
-- 执行前请备份;可重复执行。
ALTER TABLE oa_app_group CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_app CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_app_version CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_role CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_role_user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_instance CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_task CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_relation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE oa_instance_event CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;