aboutsummaryrefslogtreecommitdiffstats
path: root/database/migrations/1612629845398_users_update_schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations/1612629845398_users_update_schema.ts')
-rw-r--r--database/migrations/1612629845398_users_update_schema.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/database/migrations/1612629845398_users_update_schema.ts b/database/migrations/1612629845398_users_update_schema.ts
new file mode 100644
index 0000000..8831ea4
--- /dev/null
+++ b/database/migrations/1612629845398_users_update_schema.ts
@@ -0,0 +1,15 @@
1import BaseSchema from '@ioc:Adonis/Lucid/Schema';
2
3export default class extends BaseSchema {
4 public async up(): Promise<void> {
5 this.schema.alterTable('users', table => {
6 table.string('lastname', 80).notNullable().defaultTo('');
7 });
8 }
9
10 public async down(): Promise<void> {
11 this.schema.alterTable('users', table => {
12 table.dropColumn('lastname');
13 });
14 }
15}