INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.1.8',
    '2026-07-06T00:00:00+08:00',
    '邮件账户修改与连通性检查 CLI',
    '新增邮件账户修改和 IMAP 连通性检查命令，便于在不直接操作数据库的情况下维护邮箱配置并确认服务器可访问。',
    '[
        "新增 ias mail edit <id> 命令，可交互式修改已保存的 IMAP 邮件账户配置，密码留空时保留原值。",
        "新增 ias mail check <id> 命令，可使用已保存配置检查 IMAP 服务器连通性和邮箱目录可访问性。",
        "邮件账户检查成功会更新 last_checked_at 并清空 last_error，失败会记录错误信息。",
        "复用新增账户时的 IMAP 连接测试逻辑，TLS 证书错误仍支持交互式选择接受无效证书后重试。",
        "无数据库结构变化。"
    ]'::jsonb,
    '{
        "ias-common": "0.1.0",
        "ias-ai": "0.1.0",
        "ias-wechat": "0.1.0",
        "ias-context": "0.1.0",
        "ias-http": "0.1.0",
        "ias-mail": "0.1.1",
        "ias-service": "0.1.0",
        "ias-main": "0.1.8"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
