0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/schemas/tables/hooks.sql
2023-05-09 09:25:45 +08:00

15 lines
554 B
SQL

create table hooks (
tenant_id varchar(21) not null
references tenants (id) on update cascade on delete cascade,
id varchar(21) not null,
name varchar(256) not null default '',
event varchar(128) /* @use HookEvent */,
events jsonb /* @use HookEvents */ not null default '[]'::jsonb,
config jsonb /* @use HookConfig */ not null,
signing_key varchar(64) not null default '',
enabled boolean not null default true,
created_at timestamptz not null default(now()),
primary key (id)
);
create index hooks__id on hooks (tenant_id, id);