INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.2.28',
    '2026-07-09T00:00:00+08:00',
    '邮件推送过滤和可信发件人渲染',
    '邮件账号新增标题关键字推送过滤和可信发件人列表，前端详情页按可信状态控制 HTML 邮件远程资源渲染。',
    '[
        "邮件账号新增推送标题关键字过滤配置：关键字列表为空时保持全部推送；配置后只有主题命中任一关键字的新邮件才发送微信提醒，邮件本身仍正常入库和刷新缓存。",
        "邮件账号新增可信发件人列表，邮件详情 API 返回 rendering.trusted_sender 和 rendering.remote_resources_allowed；前端详情页仅在发件人命中可信列表时允许 HTML 邮件加载远程图片资源。",
        "ias mail auth 和 ias mail edit 支持录入推送关键字和可信发件人；新增 ias mail settings <id> 可单独修改这两项邮箱设置。",
        "用户配置页面展示邮件账号的推送标题关键字和可信发件人列表，HTTP API 文档同步说明邮件详情渲染策略。",
        "数据库新增 ias_mail_accounts.notification_subject_keywords 和 ias_mail_accounts.trusted_senders 两个 TEXT[] 字段；已验证 cargo fmt --check、cargo check、cargo test -p ias-mail、cargo test -p ias-service、cargo test -p ias-http 和 bun run build。"
    ]'::jsonb,
    '{
        "ias-common": "0.1.2",
        "ias-ai": "0.1.14",
        "ias-wechat": "0.1.1",
        "ias-context": "0.1.6",
        "ias-http": "0.1.16",
        "ias-mail": "0.1.17",
        "ias-db": "0.1.1",
        "ias-service": "0.1.26",
        "ias-main": "0.2.28"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
