collab: Add subscription_usage_meters table (#29433)

This PR adds a new `subscription_usage_meters` table to the LLM
database.

We'll use this to track usage of individual models over the number of
requests built-in to the plan.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-04-25 14:32:00 -04:00 committed by GitHub
parent c3177e6f5b
commit 8cc2ade21c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,8 @@
create table subscription_usage_meters (
id serial primary key,
subscription_usage_id integer not null references subscription_usages (id) on delete cascade,
model_id integer not null references models (id) on delete cascade,
requests integer not null default 0
);
create unique index uix_subscription_usage_meters_on_subscription_usage_model on subscription_usage_meters (subscription_usage_id, model_id);