mirror of
https://github.com/openziti/zrok.git
synced 2025-08-27 15:15:27 +02:00
new limit journal test and necessary tweaks (#606)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- +migrate Up
|
||||
|
||||
create table limit_classes (
|
||||
id serial primary key,
|
||||
id integer primary key,
|
||||
|
||||
limit_scope string not null default ('account'),
|
||||
limit_action string not null default ('limit'),
|
||||
@@ -23,7 +23,7 @@ create table limit_classes (
|
||||
);
|
||||
|
||||
create table applied_limit_classes (
|
||||
id serial primary key,
|
||||
id integer primary key,
|
||||
account_id integer not null references accounts (id),
|
||||
limit_class_id integer not null references limit_classes (id),
|
||||
created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
||||
|
@@ -5,14 +5,14 @@ drop table environment_limit_journal;
|
||||
drop table share_limit_journal;
|
||||
|
||||
create table bandwidth_limit_journal (
|
||||
id serial primary key,
|
||||
id integer primary key,
|
||||
account_id integer references accounts (id) not null,
|
||||
limit_class integer references limit_classes,
|
||||
limit_class_id integer references limit_classes,
|
||||
action string not null,
|
||||
rx_bytes bigint not null,
|
||||
tx_bytes bigint not null,
|
||||
created_at timestamptz not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
||||
updated_at timestamptz not null default(strftime('%Y-%m-%d %H:%M:%f', 'now'))
|
||||
created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
||||
updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now'))
|
||||
);
|
||||
|
||||
create index bandwidth_limit_journal_account_id_idx on bandwidth_limit_journal (account_id);
|
Reference in New Issue
Block a user