INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.2.3',
    '2026-07-07T00:00:00+08:00',
    '修复邮件自动通知漏发',
    '修复后台邮件轮询因 IMAP 已读标记跳过新邮件通知的问题，并让轮询抓取范围遵循账户配置。',
    '[
        "修复邮件自动通知漏发：后台轮询现在会对所有新入库邮件发送通知，不再因为 IMAP \\Seen 已读标记跳过通知。",
        "邮件轮询现在尊重账户配置的 fetch_limit，不再固定只检查最近 20 封邮件。",
        "邮件轮询启动日志新增 fetch_limit，便于确认实际加载的抓取范围。",
        "新增单元测试覆盖已读新邮件仍会被自动轮询处理，以及不同抓取上限下的 IMAP 序列范围计算。"
    ]'::jsonb,
    '{
        "ias-common": "0.1.0",
        "ias-ai": "0.1.1",
        "ias-wechat": "0.1.0",
        "ias-context": "0.1.1",
        "ias-http": "0.1.3",
        "ias-mail": "0.1.11",
        "ias-service": "0.1.4",
        "ias-main": "0.2.3"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
