aboutsummaryrefslogtreecommitdiffstats
path: root/database/migrations/1612629845398_users_update_schema.js
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations/1612629845398_users_update_schema.js')
-rw-r--r--database/migrations/1612629845398_users_update_schema.js18
1 files changed, 18 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..10b82aa
--- /dev/null
+++ b/database/migrations/1612629845398_users_update_schema.js
@@ -0,0 +1,18 @@
1/** @type {import('@adonisjs/lucid/src/Schema')} */
2const Schema = use('Schema');
3
4class UsersUpdateSchema extends Schema {
5 up() {
6 this.table('users', (table) => {
7 table.string('lastname', 80).notNullable().default('');
8 });
9 }
10
11 down() {
12 this.table('users', (table) => {
13 table.dropColumn('lastname');
14 });
15 }
16}
17
18module.exports = UsersUpdateSchema;