0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

refactor: user_name -> username

This commit is contained in:
Gao Sun 2021-07-04 17:38:37 +08:00
parent d6e8d11310
commit eb67c38cbc
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ import { PasswordEncryptionMethod } from './custom-types';
export type UserDBEntry = { export type UserDBEntry = {
id: string; id: string;
userName?: string; username?: string;
primaryEmail?: string; primaryEmail?: string;
primaryPhone?: string; primaryPhone?: string;
passwordEncrypted?: string; passwordEncrypted?: string;
@ -16,7 +16,7 @@ export const Users = Object.freeze({
table: 'users', table: 'users',
fields: { fields: {
id: 'id', id: 'id',
userName: 'user_name', username: 'username',
primaryEmail: 'primary_email', primaryEmail: 'primary_email',
primaryPhone: 'primary_phone', primaryPhone: 'primary_phone',
passwordEncrypted: 'password_encrypted', passwordEncrypted: 'password_encrypted',
@ -25,7 +25,7 @@ export const Users = Object.freeze({
}, },
fieldKeys: [ fieldKeys: [
'id', 'id',
'userName', 'username',
'primaryEmail', 'primaryEmail',
'primaryPhone', 'primaryPhone',
'passwordEncrypted', 'passwordEncrypted',

View file

@ -2,7 +2,7 @@ create type password_encryption_method as enum ('SaltAndPepper');
create table users ( create table users (
id varchar(24) not null, id varchar(24) not null,
user_name varchar(128) unique, username varchar(128) unique,
primary_email varchar(128) unique, primary_email varchar(128) unique,
primary_phone varchar(128) unique, primary_phone varchar(128) unique,
password_encrypted varchar(128), password_encrypted varchar(128),