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

12 lines
332 B
MySQL
Raw Normal View History

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);