include rx|tx byte counts in limits journals (#273)

This commit is contained in:
Michael Quigley
2023-03-17 12:57:26 -04:00
parent 0fa682e764
commit b69237e9cc
5 changed files with 24 additions and 6 deletions

View File

@ -5,6 +5,8 @@ create type limit_action_type as enum ('clear', 'warning', 'limit');
create table account_limit_journal (
id serial primary key,
account_id integer references accounts(id),
rx_bytes bigint not null,
tx_bytes bigint not null,
action limit_action_type not null,
created_at timestamptz not null default(current_timestamp),
updated_at timestamptz not null default(current_timestamp)
@ -13,6 +15,8 @@ create table account_limit_journal (
create table environment_limit_journal (
id serial primary key,
environment_id integer references environments(id),
rx_bytes bigint not null,
tx_bytes bigint not null,
action limit_action_type not null,
created_at timestamptz not null default(current_timestamp),
updated_at timestamptz not null default(current_timestamp)
@ -21,6 +25,8 @@ create table environment_limit_journal (
create table share_limit_journal (
id serial primary key,
share_id integer references shares(id),
rx_bytes bigint not null,
tx_bytes bigint not null,
action limit_action_type not null,
created_at timestamptz not null default(current_timestamp),
updated_at timestamptz not null default(current_timestamp)