diff options
author | vantezzen <properly@protonmail.com> | 2019-08-22 11:12:36 +0200 |
---|---|---|
committer | vantezzen <properly@protonmail.com> | 2019-08-22 11:12:36 +0200 |
commit | b018adf240679ec59a7344e30be39400f1ecd8af (patch) | |
tree | c076635761667dad302716b498088f1047281e46 /database/migrations/1503250034279_user.js | |
download | ferdium-server-b018adf240679ec59a7344e30be39400f1ecd8af.tar.gz ferdium-server-b018adf240679ec59a7344e30be39400f1ecd8af.tar.zst ferdium-server-b018adf240679ec59a7344e30be39400f1ecd8af.zip |
Initial commit
Diffstat (limited to 'database/migrations/1503250034279_user.js')
-rw-r--r-- | database/migrations/1503250034279_user.js | 22 |
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')} */ | ||
4 | const Schema = use('Schema') | ||
5 | |||
6 | class 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 | |||
22 | module.exports = UserSchema | ||