DELETE rp FROM qipai_role_permissions rp
INNER JOIN qipai_permissions p ON p.id = rp.permission_id
WHERE p.code IN ('user.read', 'staff.manage', 'session.reset');
DELETE FROM qipai_permissions WHERE code IN ('user.read', 'staff.manage', 'session.reset');
DELETE FROM qipai_schema_migrations WHERE version = '2026061806';
DROP TABLE IF EXISTS qipai_user_admin_profiles;
