Roo-Code/evals/packages/db/drizzle/0000_elite_raza.sql
Chris Estreich d15f813514
Evals (#2238)
* Evals

* Remove redundant line

* Fix tsc error

* Disable debug mode

* Add option to kill run
2025-04-02 16:49:41 -07:00

40 lines
No EOL
1.3 KiB
SQL

CREATE TABLE `runs` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`taskMetricsId` integer,
`model` text NOT NULL,
`description` text,
`pid` integer,
`socketPath` text NOT NULL,
`passed` integer DEFAULT 0 NOT NULL,
`failed` integer DEFAULT 0 NOT NULL,
`createdAt` integer NOT NULL,
FOREIGN KEY (`taskMetricsId`) REFERENCES `taskMetrics`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE TABLE `taskMetrics` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`tokensIn` integer NOT NULL,
`tokensOut` integer NOT NULL,
`tokensContext` integer NOT NULL,
`cacheWrites` integer NOT NULL,
`cacheReads` integer NOT NULL,
`cost` real NOT NULL,
`duration` integer NOT NULL,
`createdAt` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE `tasks` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`runId` integer NOT NULL,
`taskMetricsId` integer,
`language` text NOT NULL,
`exercise` text NOT NULL,
`passed` integer,
`startedAt` integer,
`finishedAt` integer,
`createdAt` integer NOT NULL,
FOREIGN KEY (`runId`) REFERENCES `runs`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`taskMetricsId`) REFERENCES `taskMetrics`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
CREATE UNIQUE INDEX `tasks_language_exercise_idx` ON `tasks` (`runId`,`language`,`exercise`);