INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.2.10',
    '2026-07-07T00:00:00+08:00',
    '修复邮件已读状态和详情页返回上下文',
    '修复邮件详情页自动标记已读后可能被后续轮询回滚的问题，并保留邮件详情页的列表查询上下文。',
    '[
        "修复邮件详情页自动标记已读后，下一轮 IMAP 轮询可能把本地已读状态回滚为未读的问题；本地已读状态现在不会被远端未读标记降级。",
        "修复从筛选后的邮件列表进入详情页时丢失搜索、已读筛选和分页参数的问题；详情页返回列表、上一封和下一封会保留当前查询上下文。",
        "说明：SMTP 只负责发信，不能设置收件箱邮件已读状态；已读同步需要 IMAP \\Seen 标记或服务端本地状态维护。",
        "无数据库结构变化；ias-mail 升级至 0.1.14。"
    ]'::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.5",
        "ias-mail": "0.1.14",
        "ias-service": "0.1.7",
        "ias-main": "0.2.10"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
