adonis-fullstack-app/database/migrations/1503248427885_user.js
Luiz Felipe 550bcd891d style(migration): use parentheses in arrow function
* Update 1503248427885_user.js
* Update 1503248427886_token.js
2018-06-05 17:53:20 +05:30

22 lines
421 B
JavaScript

'use strict'
const Schema = use('Schema')
class UserSchema extends Schema {
up () {
this.create('users', (table) => {
table.increments()
table.string('username', 80).notNullable().unique()
table.string('email', 254).notNullable().unique()
table.string('password', 60).notNullable()
table.timestamps()
})
}
down () {
this.drop('users')
}
}
module.exports = UserSchema