diff options
Diffstat (limited to 'database/migrations/1612629845398_users_update_schema.js')
-rw-r--r-- | database/migrations/1612629845398_users_update_schema.js | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/database/migrations/1612629845398_users_update_schema.js b/database/migrations/1612629845398_users_update_schema.js index d07f66d..10b82aa 100644 --- a/database/migrations/1612629845398_users_update_schema.js +++ b/database/migrations/1612629845398_users_update_schema.js | |||
@@ -1,20 +1,18 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | /** @type {import('@adonisjs/lucid/src/Schema')} */ | 1 | /** @type {import('@adonisjs/lucid/src/Schema')} */ |
4 | const Schema = use('Schema') | 2 | const Schema = use('Schema'); |
5 | 3 | ||
6 | class UsersUpdateSchema extends Schema { | 4 | class UsersUpdateSchema extends Schema { |
7 | up() { | 5 | up() { |
8 | this.table('users', (table) => { | 6 | this.table('users', (table) => { |
9 | table.string('lastname', 80).notNullable().default(''); | 7 | table.string('lastname', 80).notNullable().default(''); |
10 | }) | 8 | }); |
11 | } | 9 | } |
12 | 10 | ||
13 | down() { | 11 | down() { |
14 | this.table('users', (table) => { | 12 | this.table('users', (table) => { |
15 | table.dropColumn('lastname') | 13 | table.dropColumn('lastname'); |
16 | }) | 14 | }); |
17 | } | 15 | } |
18 | } | 16 | } |
19 | 17 | ||
20 | module.exports = UsersUpdateSchema \ No newline at end of file | 18 | module.exports = UsersUpdateSchema; |