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/user_logs.sql
Darcy Ye 9ed146645b
revert(core): manually revert forgot password logic (#365)
* Revert "feat(core): add email forgot password flow (send/verify passcode) (#336)"

* Revert "feat(core): post /session/forgot-password/phone/verify-passcode-and-reset-password (#334)"

* Revert "feat(core): add forgot password send a passcode to phone route (#326)"
2022-03-11 17:45:42 +08:00

13 lines
618 B
SQL

create type user_log_type as enum ('SignInUsernameAndPassword', 'SignInEmail', 'SignInPhone', 'SignInSocial', 'RegisterUsernameAndPassword', 'RegisterEmail', 'RegisterPhone', 'RegisterSocial', '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)
);