mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-17 13:24:45 +08:00
feat(db): add upstream_model column to usage_logs
Add nullable VARCHAR(100) column to record the actual model sent to upstream providers when model mapping is applied. NULL means no mapping — the requested model was used as-is. Includes migration, concurrent index for aggregation queries, Ent schema regeneration, and migration README correction (forward-only runner, not goose).
This commit is contained in:
4
backend/migrations/075_add_usage_log_upstream_model.sql
Normal file
4
backend/migrations/075_add_usage_log_upstream_model.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Add upstream_model field to usage_logs.
|
||||
-- Stores the actual upstream model name when it differs from the requested model
|
||||
-- (i.e., when model mapping is applied). NULL means no mapping was applied.
|
||||
ALTER TABLE usage_logs ADD COLUMN IF NOT EXISTS upstream_model VARCHAR(100);
|
||||
Reference in New Issue
Block a user