Files
team-api/migrations/000017_unify_input_tokens_cache_semantics.sql
T

10 lines
735 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.
-- +goose Up
-- 列语义注释同步更新(cache_creation_tokens 兼收 OpenAI Responses 的 cache_write_tokens)
COMMENT ON COLUMN bil_usage_logs.input_tokens IS '输入 token 数(含缓存总输入:base + cache_read + cache_creation,跨渠道统一口径)';
COMMENT ON COLUMN bil_usage_logs.cache_creation_tokens IS '写入缓存的 token 数(Claude cache_creation_input_tokens / OpenAI Responses cache_write_tokens)';
COMMENT ON COLUMN bil_usage_daily.input_tokens IS '输入Token合计(含缓存总输入,源自 bil_usage_logs.input_tokens)';
COMMENT ON COLUMN bil_usage_daily.cache_creation_tokens IS '写入缓存的 token 数(Claude cache_creation / OpenAI cache_write,SUM 聚合)';
-- +goose Down