Files
ai_academy/migrations/versioned/000104_skill_served_version.up.sql
runny 7ec21f35b0 chore: 初始化仓库,导入项目基线代码
Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、
Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。
今日开发的培训推送管理改动随后单独提交。
2026-11-16 18:12:23 +08:00

13 lines
842 B
SQL

-- Description: The version of a skill the live image still carries while a
-- newer install of it is in flight or has failed. An install rewrites the row
-- to describe the version being installed as soon as it starts, but the image
-- pointer only moves when that install succeeds, so the previous version keeps
-- running in every sandbox. This column is what lets the agent go on using it
-- instead of losing the skill for the length of the upgrade.
DO $$ BEGIN RAISE NOTICE '[Migration 000104] Adding tenant_skills.served'; END $$;
ALTER TABLE tenant_skills ADD COLUMN IF NOT EXISTS served JSONB;
COMMENT ON COLUMN tenant_skills.served IS
'Version still in the image while a newer install is pending or failed: {version,description,instructions,bundle_sha256,bundle_ref,snapshot_id}. NULL when the row itself is what is served.';