mirror of
https://github.com/logto-io/logto.git
synced 2024-12-23 20:33:16 -05:00
fa85b7d0eb
Keeping withtyped will introduce an additional database pool per tenant, which is not good for performance and it should be more like all-or-nothing choice. So remove it for core, but keep it in cloud.
13 lines
443 B
SQL
13 lines
443 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,
|
|
event varchar(128) /* @use HookEvent */ not null,
|
|
config jsonb /* @use HookConfig */ not null,
|
|
created_at timestamptz not null default(now()),
|
|
primary key (id)
|
|
);
|
|
|
|
create index hooks__id on hooks (tenant_id, id);
|
|
|
|
create index hooks__event on hooks (tenant_id, event);
|