mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +01:00
identities ddl (#10)
This commit is contained in:
parent
e63e831374
commit
7fd1287465
@ -16,15 +16,28 @@ create table accounts (
|
||||
constraint chk_token check(token <> '')
|
||||
);
|
||||
|
||||
--
|
||||
-- identities
|
||||
--
|
||||
create table identities (
|
||||
id integer primary key,
|
||||
account_id integer constraint fk_accounts_identities references accounts on delete cascade,
|
||||
ziti_id string not null unique,
|
||||
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')),
|
||||
|
||||
constraint chk_ziti_id check (ziti_id <> '')
|
||||
);
|
||||
|
||||
--
|
||||
-- services
|
||||
--
|
||||
create table services (
|
||||
id integer primary key,
|
||||
account_id integer constraint fk_accounts_service references accounts on delete cascade,
|
||||
account_id integer constraint fk_accounts_services references accounts on delete cascade,
|
||||
ziti_id string not null unique,
|
||||
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')),
|
||||
|
||||
constraint chk_name check (ziti_id <> '')
|
||||
constraint chk_ziti_id check (ziti_id <> '')
|
||||
);
|
Loading…
Reference in New Issue
Block a user