0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/schemas/tables/daily_token_usage.sql

11 lines
332 B
SQL

create table daily_token_usage (
id varchar(21) not null,
tenant_id varchar(21) not null
references tenants (id) on update cascade on delete cascade,
usage bigint not null default(0),
date timestamptz not null,
primary key (id)
);
create unique index daily_token_usage__date
on daily_token_usage (tenant_id, date);