Files
iAs/migrations/20260601000013_fix_llm_usage_kind_entry_newdb.sql
T
wunianxiao 031f160393 fix: 回退迁移0010到原内容, 新增0013, 删除已应用迁移记录重新对齐
迁移 0010/0011 在首次 service 运行后被修改,导致 sqlx 校验和不匹配。
0010 回退到仅 ALTER COLUMN DROP NOT NULL(已幂等执行)。
新增 0013 处理全新数据库缺少 kind/entry 列的问题。
已通过 psql 删除 _sqlx_migrations 中的 0010/0011 记录,
下次 service 启动将重新应用(均为幂等操作)。
2026-06-02 20:10:25 +08:00

4 lines
232 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 确保 llm_usage 表在全新数据库上也有 kind/entry 列(迁移 0010 仅解除了旧库的 NOT NULL
ALTER TABLE llm_usage ADD COLUMN IF NOT EXISTS kind TEXT;
ALTER TABLE llm_usage ADD COLUMN IF NOT EXISTS entry JSONB;