mirror of
https://github.com/logto-io/logto.git
synced 2024-12-23 20:33:16 -05:00
12 lines
332 B
MySQL
12 lines
332 B
MySQL
|
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);
|