Skip to content

Commit

Permalink
feat(user): make email and username unique fixes #136
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMaz committed Nov 28, 2023
1 parent 10b8b26 commit 0495646
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/nestjs-user/src/entities/user-postgres.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ export abstract class UserPostgresEntity implements UserEntityInterface {
/**
* Email
*/
@Column()
@Column({ unique: true })
email!: string;

/**
* Username
*/
@Column()
@Column({ unique: true })
username!: string;

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/nestjs-user/src/entities/user-sqlite.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export abstract class UserSqliteEntity implements UserEntityInterface {
/**
* Email
*/
@Column()
@Column({ unique: true })
email!: string;

/**
* Username
*/
@Column()
@Column({ unique: true })
username!: string;

/**
Expand Down

0 comments on commit 0495646

Please sign in to comment.