limits ddl for postgres (#606)

This commit is contained in:
Michael Quigley 2024-05-13 12:36:00 -04:00
parent 017773f816
commit 5d72890d32
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -0,0 +1,19 @@
-- +migrate Up
create type limit_scope as enum ('account', 'environment', 'share');
create type limit_action as enum ('warning', 'limit');
create table limits_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,
period_minutes int not null default (1440),
rx_bytes bigint not null default (-1),
tx_bytes bigint not null default (-1),
total_bytes bigint not null default (-1),
created_at timestamptz not null default(current_timestamp),
updated_at timestamptz not null default(current_timestamp),
deleted boolean not null default(false)
)