mirror of
https://github.com/openziti/zrok.git
synced 2025-03-27 14:46:03 +01:00
basic store migrations to support access_grants (#432)
This commit is contained in:
parent
00a5622778
commit
5cfd67ab19
@ -0,0 +1,14 @@
|
||||
-- +migrate Up
|
||||
|
||||
create type permission_mode_type as enum('open', 'closed');
|
||||
|
||||
alter table shares add column permission_mode permission_mode_type not null default('open');
|
||||
|
||||
create table access_grants (
|
||||
id serial primary key,
|
||||
share_id integer references shares(id),
|
||||
account_id integer references accounts(id),
|
||||
created_at timestamptz not null default(current_timestamp),
|
||||
updated_at timestamptz not null default(current_timestamp),
|
||||
deleted boolean not null default(false)
|
||||
);
|
@ -0,0 +1,12 @@
|
||||
-- +migrate Up
|
||||
|
||||
alter table shares add column permission_mode string not null default('open');
|
||||
|
||||
create table access_grants (
|
||||
id serial primary key,
|
||||
share_id integer references shares(id),
|
||||
account_id integer references accounts(id),
|
||||
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')),
|
||||
deleted boolean not null default(false)
|
||||
);
|
Loading…
Reference in New Issue
Block a user