new bandwidth_limit_journal table (#606)

This commit is contained in:
Michael Quigley
2024-05-30 14:27:39 -04:00
parent af5197d041
commit ea5670b4ae
4 changed files with 37 additions and 109 deletions

View File

@ -0,0 +1,19 @@
-- +migrate Up
drop table account_limit_journal;
drop table environment_limit_journal;
drop table share_limit_journal;
drop type limit_action_type;
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,
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)
);