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