chore: init adonis

This commit is contained in:
Sonny
2024-04-27 15:49:47 +02:00
committed by Sonny
parent 219e5e3aed
commit 1386db6935
259 changed files with 7184 additions and 18173 deletions

View File

@@ -0,0 +1,21 @@
import { BaseSchema } from '@adonisjs/lucid/schema';
export default class extends BaseSchema {
protected tableName = 'users';
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').notNullable();
table.string('full_name').nullable();
table.string('email', 254).notNullable().unique();
table.string('password').notNullable();
table.timestamp('created_at').notNullable();
table.timestamp('updated_at').nullable();
});
}
async down() {
this.schema.dropTable(this.tableName);
}
}