Skip to content

Commit fe60412

Browse files
feat(db): add requested model usage log migrations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent a225a24 commit fe60412

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- Add requested_model field to usage_logs for normalized request/upstream model tracking.
2+
-- NULL means historical rows written before requested_model dual-write was introduced.
3+
ALTER TABLE usage_logs ADD COLUMN IF NOT EXISTS requested_model VARCHAR(100);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- Support requested_model / upstream_model aggregations with time-range filters.
2+
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_usage_logs_created_requested_model_upstream_model
3+
ON usage_logs (created_at, requested_model, upstream_model);

0 commit comments

Comments
 (0)