From 7ebeda1d92852430ad7978d1199f7e5236ac8007 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Sat, 3 Jul 2021 17:44:03 +0800 Subject: [PATCH] Add password encryption salt --- packages/schemas/src/db-entries/user.ts | 2 ++ packages/schemas/tables/users.sql | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/schemas/src/db-entries/user.ts b/packages/schemas/src/db-entries/user.ts index 0e6611bfc..db3838901 100644 --- a/packages/schemas/src/db-entries/user.ts +++ b/packages/schemas/src/db-entries/user.ts @@ -7,6 +7,7 @@ export type UserDBEntry = { primaryPhone?: string; passwordEncrypted?: string; passwordEncryptionMethod?: string; + passwordEncryptionSalt?: string; }; export const Users = Object.freeze({ @@ -18,5 +19,6 @@ export const Users = Object.freeze({ primaryPhone: 'primary_phone', passwordEncrypted: 'password_encrypted', passwordEncryptionMethod: 'password_encryption_method', + passwordEncryptionSalt: 'password_encryption_salt', }, } as const); diff --git a/packages/schemas/tables/users.sql b/packages/schemas/tables/users.sql index a2ed30544..c567d8e31 100644 --- a/packages/schemas/tables/users.sql +++ b/packages/schemas/tables/users.sql @@ -5,5 +5,6 @@ create table users ( primary_phone varchar(128) unique, password_encrypted varchar(128), password_encryption_method varchar(32), + password_encryption_salt varchar(128), primary key (id) );