From b018adf240679ec59a7344e30be39400f1ecd8af Mon Sep 17 00:00:00 2001 From: vantezzen Date: Thu, 22 Aug 2019 11:12:36 +0200 Subject: Initial commit --- database/migrations/1503250034279_user.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 database/migrations/1503250034279_user.js (limited to 'database/migrations/1503250034279_user.js') diff --git a/database/migrations/1503250034279_user.js b/database/migrations/1503250034279_user.js new file mode 100644 index 0000000..9148593 --- /dev/null +++ b/database/migrations/1503250034279_user.js @@ -0,0 +1,22 @@ +'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() + table.string('email', 254).notNullable().unique() + table.string('password', 60).notNullable() + table.timestamps() + }) + } + + down () { + this.drop('users') + } +} + +module.exports = UserSchema -- cgit v1.2.3-54-g00ecf