import BaseSchema from '@ioc:Adonis/Lucid/Schema'; export default class Users extends BaseSchema { protected tableName = 'users'; public async up() { this.schema.createTable(this.tableName, table => { table.string('id', 21).primary(); table.string('first_name', 24).notNullable(); table.string('last_name', 24).notNullable(); table.text('about'); table.string('login', 128).notNullable().unique(); table.string('email').notNullable().unique(); table.string('password').notNullable(); table.timestamp('last_login', { useTz: true }); table.timestamp('created_at', { useTz: true }); table.timestamp('updated_at', { useTz: true }); }); } public async down() { this.schema.dropTable(this.tableName); } }