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.js22
1 files changed, 22 insertions, 0 deletions
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 @@
1'use strict'
2
3/** @type {import('@adonisjs/lucid/src/Schema')} */
4const Schema = use('Schema')
5
6class UserSchema extends Schema {
7 up () {
8 this.create('users', (table) => {
9 table.increments()
10 table.string('username', 80).notNullable()
11 table.string('email', 254).notNullable().unique()
12 table.string('password', 60).notNullable()
13 table.timestamps()
14 })
15 }
16
17 down () {
18 this.drop('users')
19 }
20}
21
22module.exports = UserSchema