From e591a65945388a82f73c55a0ef31a3e871e18545 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Fri, 5 Mar 2021 00:25:06 +0100 Subject: [PATCH] UserEntity: Make userName unique Each username should only be given once. Signed-off-by: Philip Molares --- src/users/user.entity.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/users/user.entity.ts b/src/users/user.entity.ts index ca753c7bd..33e26114d 100644 --- a/src/users/user.entity.ts +++ b/src/users/user.entity.ts @@ -23,7 +23,9 @@ export class User { @PrimaryGeneratedColumn('uuid') id: string; - @Column() + @Column({ + unique: true, + }) userName: string; @Column()