0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/schemas/tables/domains.sql

18 lines
628 B
MySQL
Raw Normal View History

create table domains (
tenant_id varchar(21) not null
references tenants (id) on update cascade on delete cascade,
id varchar(21) not null,
domain varchar(256) not null,
status varchar(32) not null default('PendingVerification'),
error_message varchar(1024),
dns_records jsonb /* @use DomainDnsRecords */ not null default '[]'::jsonb,
cloudflare_data jsonb /* @use CloudflareData */,
updated_at timestamptz not null default(now()),
created_at timestamptz not null default(now()),
primary key (id),
constraint domains__domain
unique (domain)
);
create index domains__id on domains (tenant_id, id);