2022-01-26 02:32:03 -05:00
|
|
|
create table passcodes (
|
2022-04-18 02:27:58 -05:00
|
|
|
id varchar(21) not null,
|
2022-01-29 02:30:50 -05:00
|
|
|
interaction_jti varchar(128) not null,
|
2022-01-26 02:32:03 -05:00
|
|
|
phone varchar(32),
|
|
|
|
email varchar(128),
|
2022-12-27 01:13:42 -05:00
|
|
|
type varchar(32) not null,
|
2022-01-26 02:32:03 -05:00
|
|
|
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)
|
|
|
|
);
|
2022-12-27 01:13:42 -05:00
|
|
|
|
|
|
|
create index passcodes__interaction_jti_type
|
|
|
|
on passcodes (
|
|
|
|
interaction_jti,
|
|
|
|
type
|
|
|
|
);
|