wlzboy
2025-12-24 b30c1ebb0e46e734e70f8731484764f449f48818
1
2
3
4
5
6
7
8
-- 在sys_dept表中添加department_id字段,用于记录SQL Server中的departmentID
-- 该字段用于部门同步功能
 
-- 添加department_id字段
ALTER TABLE sys_dept ADD COLUMN department_id INT NULL COMMENT 'SQL Server中的部门ID';
 
-- 为department_id字段创建索引,提高查询效率
CREATE INDEX idx_department_id ON sys_dept(department_id);