1587661295308_users_schema.js 432 B

12345678910111213141516171819202122
  1. 'use strict'
  2. /** @type {import('@adonisjs/lucid/src/Schema')} */
  3. const Schema = use('Schema')
  4. class UsersSchema extends Schema {
  5. up () {
  6. this.create('users', (table) => {
  7. table.increments()
  8. table.string('username', 80).notNullable()
  9. table.string('email', 254).notNullable()
  10. table.string('password', 60).notNullable()
  11. })
  12. }
  13. down () {
  14. this.drop('users')
  15. }
  16. }
  17. module.exports = UsersSchema