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/oidc_model_instances.sql

27 lines
643 B
MySQL
Raw Normal View History

2021-06-22 11:07:51 -05:00
create table oidc_model_instances (
model_name varchar(64) not null,
id varchar(128) not null,
payload jsonb /* @use OidcModelInstancePayload */ not null,
2021-08-18 03:36:52 -05:00
expires_at timestamptz not null,
consumed_at timestamptz,
2021-06-22 11:07:51 -05:00
primary key (model_name, id)
);
create index oidc_model_instances__model_name_payload_user_code
2021-06-22 11:07:51 -05:00
on oidc_model_instances (
model_name,
(payload->>'userCode')
2021-06-22 11:07:51 -05:00
);
create index oidc_model_instances__model_name_payload_uid
2021-06-22 11:07:51 -05:00
on oidc_model_instances (
model_name,
(payload->>'uid')
2021-06-22 11:07:51 -05:00
);
create index oidc_model_instances__model_name_payload_grant_id
2021-06-22 11:07:51 -05:00
on oidc_model_instances (
model_name,
(payload->>'grantId')
2021-06-22 11:07:51 -05:00
);