SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;

-- 使用 utf8mb4 连接字符集，保证中文注释、中文名称和 emoji 在导入时不被降级。

DELETE arp
FROM admin_role_permissions arp
JOIN admin_permissions p ON p.id = arp.permission_id
WHERE p.code IN ('service:view', 'service:create', 'service:update', 'service:operate');

DELETE FROM admin_menus
WHERE code = 'services'
   OR permission_code IN ('service:view', 'service:create', 'service:update', 'service:operate');

DELETE FROM admin_permissions
WHERE code IN ('service:view', 'service:create', 'service:update', 'service:operate');

-- 生产账号不要求 DROP 权限；服务管理菜单和权限已移除，废弃表即使保留也不再被代码访问。
