mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
e515c04d44
* refactor(core,schemas,console): refactor log key types and sso-connector authn-url api name refactor log key types and sso-connector authn-url api name * feat(schemas): add user sso identities table (#4801) * feat(schemas): add user sso identities table add user sso identities table * fix(schemas): fix alterations fix alterations * refactor(schemas): use unique constrain use unique constrain
17 lines
710 B
SQL
17 lines
710 B
SQL
/* init_order = 2 */
|
|
|
|
create table user_sso_identities (
|
|
tenant_id varchar(21) not null
|
|
references tenants (id) on update cascade on delete cascade,
|
|
id varchar(21) not null,
|
|
user_id varchar(12) not null references users (id) on update cascade on delete cascade,
|
|
/** Unique provider identifier. Issuer of the OIDC connectors, entityId of the SAML providers */
|
|
issuer varchar(256) not null,
|
|
/** Provider user identity id*/
|
|
identity_id varchar(128) not null,
|
|
detail jsonb /* @use JsonObject */ not null default '{}'::jsonb,
|
|
created_at timestamp not null default(now()),
|
|
primary key (id),
|
|
constraint user_sso_identities__issuer__identity_id
|
|
unique (tenant_id, issuer, identity_id)
|
|
);
|