mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 16:54:23 +01:00
limits journals ddl (#273)
This commit is contained in:
parent
192a49fe19
commit
1af440fa37
@ -0,0 +1,27 @@
|
||||
-- +migrate Up
|
||||
|
||||
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),
|
||||
action limit_action_type not null,
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp)
|
||||
);
|
||||
|
||||
create table environment_limit_journal (
|
||||
id serial primary key,
|
||||
environment_id integer references environments(id),
|
||||
action limit_action_type not null,
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp)
|
||||
);
|
||||
|
||||
create table share_limit_journal (
|
||||
id serial primary key,
|
||||
share_id integer references shares(id),
|
||||
action limit_action_type not null,
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp)
|
||||
);
|
25
controller/store/sql/sqlite3/009_v0_4_0_limits_journals.sql
Normal file
25
controller/store/sql/sqlite3/009_v0_4_0_limits_journals.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- +migrate Up
|
||||
|
||||
create table account_limit_journal (
|
||||
id serial primary key,
|
||||
account_id integer references accounts(id),
|
||||
action limit_action_type not null,
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp)
|
||||
);
|
||||
|
||||
create table environment_limit_journal (
|
||||
id serial primary key,
|
||||
environment_id integer references environments(id),
|
||||
action limit_action_type not null,
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp)
|
||||
);
|
||||
|
||||
create table share_limit_journal (
|
||||
id serial primary key,
|
||||
share_id integer references shares(id),
|
||||
action limit_action_type not null,
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp)
|
||||
);
|
Loading…
Reference in New Issue
Block a user