feat: add agent_metrics table schema and Drizzle migration
Adds the agentMetrics table to SQLite schema for storing pre-computed per-agent event counts (questions, subagents, compactions), enabling listForRadar to fetch one row per agent instead of scanning log chunks. Also fixes pre-existing Drizzle snapshot chain collision in meta/ (0035/0036 snapshots had wrong prevId due to parallel agent branches) to unblock drizzle-kit generate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7
apps/server/drizzle/0037_eager_devos.sql
Normal file
7
apps/server/drizzle/0037_eager_devos.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE `agent_metrics` (
|
||||
`agent_id` text PRIMARY KEY NOT NULL,
|
||||
`questions_count` integer DEFAULT 0 NOT NULL,
|
||||
`subagents_count` integer DEFAULT 0 NOT NULL,
|
||||
`compactions_count` integer DEFAULT 0 NOT NULL,
|
||||
`updated_at` integer NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user