-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathschema.sql
More file actions
23 lines (20 loc) · 783 Bytes
/
schema.sql
File metadata and controls
23 lines (20 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
create table public.licenses (
key uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
owner_email text null,
idempotency_key text null,
support_expires_at timestamp with time zone null,
status text null,
seats bigint null,
constraint idempotency_key_unique unique (idempotency_key),
constraint licenses_pkey primary key (key)
);
create table public.license_instances (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
status text null,
label text null,
license_key uuid null,
constraint license_instances_pkey primary key (id),
constraint license_instances_license_key foreign key (license_key) references licenses (key) on delete cascade
);