Created
August 24, 2020 11:25
-
-
Save simonjcarr/79c5cf507e540242247d6f36f9d018f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| /** @type {import('@adonisjs/lucid/src/Schema')} */ | |
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment