0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00
logto/packages/schemas/tables/user_logs.sql
Wang Sijie d14f1a8841
feat(core): sign in with email (#209)
* feat(core): sign in with email

* fix: jti comment

* refactor: move sign in methods into lib
2022-01-31 11:04:55 +08:00

13 lines
504 B
SQL

create type user_log_type as enum ('SignInUsernameAndPassword', 'SignInEmail', 'ExchangeAccessToken');
create type user_log_result as enum ('Success', 'Failed');
create table user_logs (
id varchar(24) not null,
user_id varchar(24) not null,
type user_log_type not null,
result user_log_result not null, /* not using boolean, may have more result types in the future */
payload jsonb /* @use UserLogPayload */ not null,
created_at timestamptz not null default(now()),
primary key (id)
);