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 ('notification:view', 'notification:read', 'notification:read-all', 'notification:delete');

DELETE FROM admin_menus
WHERE code = 'notifications'
   OR permission_code IN ('notification:view', 'notification:read', 'notification:read-all', 'notification:delete');

DELETE FROM admin_permissions
WHERE code IN ('notification:view', 'notification:read', 'notification:read-all', 'notification:delete');

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