Files
ccdi/sql/fix_charset.sql
wkc 0cc8ef0fc3 员工信息管理
- 新增员工信息CRUD功能
- 添加员工关联人员管理
- 配置MyBatis Plus审计字段
- 添加OpenSpec规范文档
- 新增测试脚本和数据

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 14:40:27 +08:00

29 lines
951 B
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.
-- 检查并修复数据库字符集
-- 执行前请备份数据库!
-- 1. 检查数据库字符集
SELECT
DEFAULT_CHARACTER_SET_NAME,
DEFAULT_COLLATION_NAME
FROM information_schema.SCHEMATA
WHERE SCHEMA_NAME = 'discipline-prelim-check';
-- 2. 检查 dpc_employee 表字符集
SHOW CREATE TABLE dpc_employee;
-- 3. 检查 dpc_employee_relative 表字符集
SHOW CREATE TABLE dpc_employee_relative;
-- 4. 如果字符集不是 utf8mb4执行以下语句修复请根据实际情况修改
-- 修改数据库字符集
ALTER DATABASE `discipline-prelim-check` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
-- 修改表字符集
ALTER TABLE `dpc_employee` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `dpc_employee_relative` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- 5. 清空测试数据(可选)
-- TRUNCATE TABLE dpc_employee_relative;
-- TRUNCATE TABLE dpc_employee;