zen: tpm routing

This commit is contained in:
Frank 2026-04-20 22:41:30 -04:00
parent 53b0084ce2
commit 6278ce51ce
3 changed files with 2674 additions and 1 deletions

View file

@ -0,0 +1,3 @@
DROP TABLE `model_tpm_limit`;--> statement-breakpoint
ALTER TABLE `model_tpm_rate_limit` DROP PRIMARY KEY;--> statement-breakpoint
ALTER TABLE `model_tpm_rate_limit` ADD PRIMARY KEY (`id`,`interval`);

View file

@ -38,5 +38,5 @@ export const ModelTpmRateLimitTable = mysqlTable(
interval: bigint("interval", { mode: "number" }).notNull(),
count: int("count").notNull(),
},
(table) => [primaryKey({ columns: [table.id] })],
(table) => [primaryKey({ columns: [table.id, table.interval] })],
)