mirror of
https://github.com/openziti/zrok.git
synced 2025-02-21 04:32:19 +01:00
limits ddl for postgres (#606)
This commit is contained in:
parent
017773f816
commit
5d72890d32
@ -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)
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user