aboutsummaryrefslogtreecommitdiffstats
path: root/database/migrations/1503250034279_user.js
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations/1503250034279_user.js')
-rw-r--r--database/migrations/1503250034279_user.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/database/migrations/1503250034279_user.js b/database/migrations/1503250034279_user.js
index 9148593..5010bec 100644
--- a/database/migrations/1503250034279_user.js
+++ b/database/migrations/1503250034279_user.js
@@ -1,22 +1,21 @@
1'use strict'
2 1
3/** @type {import('@adonisjs/lucid/src/Schema')} */ 2/** @type {import('@adonisjs/lucid/src/Schema')} */
4const Schema = use('Schema') 3const Schema = use('Schema');
5 4
6class UserSchema extends Schema { 5class UserSchema extends Schema {
7 up () { 6 up() {
8 this.create('users', (table) => { 7 this.create('users', (table) => {
9 table.increments() 8 table.increments();
10 table.string('username', 80).notNullable() 9 table.string('username', 80).notNullable();
11 table.string('email', 254).notNullable().unique() 10 table.string('email', 254).notNullable().unique();
12 table.string('password', 60).notNullable() 11 table.string('password', 60).notNullable();
13 table.timestamps() 12 table.timestamps();
14 }) 13 });
15 } 14 }
16 15
17 down () { 16 down() {
18 this.drop('users') 17 this.drop('users');
19 } 18 }
20} 19}
21 20
22module.exports = UserSchema 21module.exports = UserSchema;