20250415213005_add_subscription_usages.sql

 1create table subscription_usages (
 2    id serial primary key,
 3    user_id integer not null,
 4    period_start_at timestamp without time zone not null,
 5    period_end_at timestamp without time zone not null,
 6    model_requests int not null default 0,
 7    edit_predictions int not null default 0
 8);
 9
10create unique index uix_subscription_usages_on_user_id_start_at_end_at on subscription_usages (user_id, period_start_at, period_end_at);