refinements and refactoring of limit classes to re-align with updated bandwidth journal, etc. (#606)

This commit is contained in:
Michael Quigley
2024-06-03 13:37:32 -04:00
parent 6256055a99
commit cea7ff6474
6 changed files with 34 additions and 53 deletions

View File

@ -1,13 +1,10 @@
-- +migrate Up
create type limit_scope as enum ('account', 'environment', 'share');
create type limit_action as enum ('warning', 'limit');
create table limit_classes (
id serial primary key,
limit_scope limit_scope not null default ('account'),
limit_action limit_action not null default ('limit'),
share_mode share_mode,
backend_mode backend_mode,
@ -20,6 +17,8 @@ create table limit_classes (
tx_bytes bigint not null default (-1),
total_bytes bigint not null default (-1),
limit_action limit_action not null default ('limit'),
created_at timestamptz not null default(current_timestamp),
updated_at timestamptz not null default(current_timestamp),
deleted boolean not null default(false)