Files
FruitServer/sql/patch-2026-10-22-category-drama-menu.sql
T

22 lines
1.1 KiB
SQL

-- Author: fruit.com.cn
-- 后台「分类管理」菜单与分类-短剧关联页(幂等,仅提交文件,由发布流程执行)
INSERT INTO sys_menu (id, parent_id, title, route_path, route_name, component, redirect, icon,
permission_code, type, always_show, affix, sort) VALUES
(36, 3, '分类管理', 'category-dramas', 'category-dramas',
'views/contentManagement/CategoryDramaView', '', '',
'drama:list', 'MENU', 0, 0, 5)
ON CONFLICT (id) DO UPDATE SET parent_id = EXCLUDED.parent_id, title = EXCLUDED.title,
route_path = EXCLUDED.route_path, route_name = EXCLUDED.route_name,
component = EXCLUDED.component, redirect = EXCLUDED.redirect, icon = EXCLUDED.icon,
permission_code = EXCLUDED.permission_code, type = EXCLUDED.type,
always_show = EXCLUDED.always_show, affix = EXCLUDED.affix, sort = EXCLUDED.sort;
INSERT INTO sys_role_menu (id, role_id, menu_id)
SELECT r.id * 1000000 + m.id, r.id, m.id
FROM sys_role r
CROSS JOIN sys_menu m
WHERE r.code IN ('super_admin', 'content_operator', 'content_reviewer', 'data_analyst')
AND m.id = 36
ON CONFLICT DO NOTHING;