Files
descrybe/apps/api/sql/schema/052_ai_call_details.sql
T

9 lines
452 B
SQL
Raw Normal View History

2026-10-16 00:55:28 +02:00
-- +goose Up
-- Exact per-call cost/cached tokens for the short-lived AI call inspector.
-- Nullable because historical rows did not capture per-call costs.
ALTER TABLE ai_call_logs ADD COLUMN IF NOT EXISTS cached_prompt_tokens INTEGER;
ALTER TABLE ai_call_logs ADD COLUMN IF NOT EXISTS cost_micros BIGINT;
-- +goose Down
ALTER TABLE ai_call_logs DROP COLUMN IF EXISTS cost_micros;
ALTER TABLE ai_call_logs DROP COLUMN IF EXISTS cached_prompt_tokens;