qiangdanxitong/database/add_is_admin_field.sql
Your Name e0a9402efd feat: 添加用户管理员身份设置功能
- 数据库添加is_admin字段和索引
- User实体类添加isAdmin字段
- 后端添加setAdmin API(UserController和UserService)
- 前端用户管理界面添加管理员标识列
- 添加设置/取消管理员按钮及功能
- 用户管理表格显示管理员标识(红色标签)
2026-01-03 10:13:29 +08:00

12 lines
387 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.

-- 为 sys_user 表添加 is_admin 字段
-- 作者:系统
-- 日期:2026-01-03
-- 说明:添加管理员标识字段,用于标识用户是否具有管理员权限
ALTER TABLE `sys_user`
ADD COLUMN `is_admin` TINYINT DEFAULT 0 COMMENT '是否管理员:0-否 1-是' AFTER `status`;
-- 更新索引以提高查询性能
CREATE INDEX `idx_is_admin` ON `sys_user` (`is_admin`);