replacing the old account/environment/share limit journals with the new bandwidth limit journal (#606)

This commit is contained in:
Michael Quigley
2024-05-31 14:26:29 -04:00
parent ea5670b4ae
commit 481cc7f7ad
8 changed files with 89 additions and 385 deletions

View File

@ -10,10 +10,12 @@ create type limit_action_type as enum ('warning', 'limit');
create table bandwidth_limit_journal (
id serial primary key,
account_id integer references accounts (id) not null,
limit_class integer references limit_classes,
limit_class_id integer references limit_classes (id),
action limit_action_type not null,
rx_bytes bigint not null,
tx_bytes bigint not null,
created_at timestamptz not null default(current_timestamp),
updated_at timestamptz not null default(current_timestamp)
);
);
create index bandwidth_limit_journal_account_id_idx on bandwidth_limit_journal (account_id);