2021-07-03 06:13:05 -05:00
|
|
|
create type password_encryption_method as enum ('SaltAndPepper');
|
|
|
|
|
2021-07-02 08:09:08 -05:00
|
|
|
create table users (
|
|
|
|
id varchar(24) not null,
|
2021-07-04 04:38:37 -05:00
|
|
|
username varchar(128) unique,
|
2021-07-02 08:09:08 -05:00
|
|
|
primary_email varchar(128) unique,
|
|
|
|
primary_phone varchar(128) unique,
|
|
|
|
password_encrypted varchar(128),
|
2021-07-03 06:13:05 -05:00
|
|
|
password_encryption_method password_encryption_method,
|
2021-07-03 04:44:03 -05:00
|
|
|
password_encryption_salt varchar(128),
|
2022-01-28 00:33:57 -05:00
|
|
|
role_names jsonb /* @use RoleNames */ not null default '[]'::jsonb,
|
2022-02-08 23:55:06 -05:00
|
|
|
identities jsonb /* @use Identities */ not null default '{}'::jsonb,
|
2021-07-02 08:09:08 -05:00
|
|
|
primary key (id)
|
|
|
|
);
|