Files
Memoh/db/migrations/0020_add_model_id_tracking.up.sql
T
Acbox Liu 0cdf822603 feat: token usage state (#153)
* feat: token usage state

* fix: typo
2026-03-01 02:19:07 +08:00

9 lines
361 B
SQL

-- 0020_add_model_id_tracking
-- Add model_id column to bot_history_messages and bot_heartbeat_logs for per-model usage tracking
ALTER TABLE bot_history_messages
ADD COLUMN IF NOT EXISTS model_id UUID REFERENCES models(id) ON DELETE SET NULL;
ALTER TABLE bot_heartbeat_logs
ADD COLUMN IF NOT EXISTS model_id UUID REFERENCES models(id) ON DELETE SET NULL;