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/passcodes.sql
Gao Sun 01f718b258
refactor!: align PasscodeType to MessageTypes
refactor: apply suggestions from code review

Co-authored-by: Darcy Ye <darcyye@silverhand.io>

refactor(core): fix type names
2022-12-27 15:29:06 +08:00

18 lines
435 B
SQL

create table passcodes (
id varchar(21) not null,
interaction_jti varchar(128) not null,
phone varchar(32),
email varchar(128),
type varchar(32) not null,
code varchar(6) not null,
consumed boolean not null default FALSE,
try_count int2 not null default 0,
created_at timestamptz not null default(now()),
primary key (id)
);
create index passcodes__interaction_jti_type
on passcodes (
interaction_jti,
type
);