Skip to content

Commit

Permalink
fix: make email field unique
Browse files Browse the repository at this point in the history
  • Loading branch information
ammezie committed Jun 23, 2022
1 parent cdf0f9c commit d6425a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/migrations/users.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class UsersSchema extends BaseSchema {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.string('name').notNullable()
table.string('email', 255).notNullable()
table.string('email', 255).unique().notNullable()
table.string('password', 180).notNullable()
table.string('remember_me_token').nullable()
table.timestamp('email_verified_at').nullable()
Expand Down

0 comments on commit d6425a8

Please sign in to comment.