chore(schema): Change token length + index

This commit is contained in:
Kevyworks 2018-04-13 15:10:34 +08:00 committed by Harminder
parent 225c4dcd58
commit 43198c1814

View File

@ -7,7 +7,7 @@ class TokensSchema extends Schema {
this.create('tokens', table => {
table.increments()
table.integer('user_id').unsigned().references('id').inTable('users')
table.string('token', 40).notNullable().unique()
table.string('token', 255).notNullable().unique().index()
table.string('type', 80).notNullable()
table.boolean('is_revoked').defaultTo(false)
table.timestamps()