DELETE rp FROM qipai_role_permissions rp
INNER JOIN qipai_roles r
  ON r.tenant_id = rp.tenant_id AND r.id = rp.role_id
INNER JOIN qipai_permissions p ON p.id = rp.permission_id
WHERE r.code = 'STAFF'
  AND p.code IN ('profile.read', 'store.operation.read');

DELETE FROM qipai_schema_migrations
WHERE version = '2026081001';
