feat(*) initial commit
This commit is contained in:
21
database/migrations/1503248427885_user.js
Normal file
21
database/migrations/1503248427885_user.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'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
|
||||
Reference in New Issue
Block a user