INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.2.4',
    '2026-07-07T00:00:00+08:00',
    '新增邮件查询 YAML HTTP 工具',
    '新增 YAML 配置的邮件查询 HTTP 工具，允许通过现有邮件 API 查询或搜索邮件列表。',
    '[
        "新增 YAML 配置的邮件查询 HTTP 工具 query_mail_messages，通过 /v1/mail/messages 查询或搜索邮件列表。",
        "工具支持关键词、邮箱目录、来源、页码和每页数量参数，返回分页信息和当前页邮件 JSON 列表。",
        "无数据库结构变化。"
    ]'::jsonb,
    '{
        "ias-common": "0.1.0",
        "ias-ai": "0.1.2",
        "ias-wechat": "0.1.0",
        "ias-context": "0.1.1",
        "ias-http": "0.1.3",
        "ias-mail": "0.1.11",
        "ias-service": "0.1.5",
        "ias-main": "0.2.4"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
