diff --git a/packages/nestjs-user/src/entities/user-postgres.entity.ts b/packages/nestjs-user/src/entities/user-postgres.entity.ts index 15a0e67c8..f7b6ae397 100644 --- a/packages/nestjs-user/src/entities/user-postgres.entity.ts +++ b/packages/nestjs-user/src/entities/user-postgres.entity.ts @@ -16,13 +16,13 @@ export abstract class UserPostgresEntity implements UserEntityInterface { /** * Email */ - @Column() + @Column({ unique: true }) email!: string; /** * Username */ - @Column() + @Column({ unique: true }) username!: string; /** diff --git a/packages/nestjs-user/src/entities/user-sqlite.entity.ts b/packages/nestjs-user/src/entities/user-sqlite.entity.ts index 88080617a..7cc7f2c9c 100644 --- a/packages/nestjs-user/src/entities/user-sqlite.entity.ts +++ b/packages/nestjs-user/src/entities/user-sqlite.entity.ts @@ -13,13 +13,13 @@ export abstract class UserSqliteEntity implements UserEntityInterface { /** * Email */ - @Column() + @Column({ unique: true }) email!: string; /** * Username */ - @Column() + @Column({ unique: true }) username!: string; /**