INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.1.14',
    '2026-07-06T00:00:00+08:00',
    '统一 v1 API 路由',
    '删除旧邮件查询兼容入口，并将 JSON API 统一迁移到 /v1 前缀；页面路由保持非 /v1 地址。',
    '[
        "删除旧邮件查询兼容路由 GET /mail-api/messages、GET /mail-api/messages/{id} 和 GET /mail-api/search。",
        "所有 JSON API 统一使用 /v1/...：邮件、上下文记忆、动态页面创建和健康检查接口均迁移到新地址。",
        "页面路由继续保持非 /v1 地址：/mail、/mail/messages/{id}、/mail/{slug}、/web/{page_type}/{slug} 和 /updates。",
        "AI 内部工具调用同步改用 /v1/web/pages 与 /v1/context/memories...。",
        "无数据库结构变化。"
    ]'::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.1",
        "ias-mail": "0.1.7",
        "ias-service": "0.1.1",
        "ias-main": "0.1.14"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
