INSERT INTO ias_upgrade_logs (
    version,
    released_at,
    title,
    description,
    changes,
    modules
) VALUES (
    '0.2.0',
    '2026-07-06T00:00:00+08:00',
    '前后端分离与 React 前端',
    '将服务端 HTML 渲染调整为 RESTful JSON API 与 React 前端，并新增前端静态文件构建与托管能力。',
    '[
        "重大架构调整：前后端分离，将 HTML 服务端渲染改为 RESTful JSON API + React 前端。",
        "新增 ias-web 前端项目，基于 Vite + React + TypeScript 构建。",
        "后端 API 路由调整：更新日志、Web 页面、邮件页面均提供 /v1 JSON 接口。",
        "后端添加 CORS 支持，并集成前端静态文件托管。",
        "新增 build.rs，前端源文件变更时自动触发 npm build。",
        "支持 SKIP_FRONTEND_BUILD 和 IA_STATIC_DIR 环境变量。",
        "前端开发代理配置自动转发 /v1 API 请求到后端。"
    ]'::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.2",
        "ias-mail": "0.1.9",
        "ias-service": "0.1.2",
        "ias-main": "0.2.0"
    }'::jsonb
) ON CONFLICT (version) DO UPDATE SET
    released_at = EXCLUDED.released_at,
    title = EXCLUDED.title,
    description = EXCLUDED.description,
    changes = EXCLUDED.changes,
    modules = EXCLUDED.modules;
