reset - start a new Portfolio with Adonis js

This commit is contained in:
Tutur33
2023-11-04 23:08:14 +01:00
parent 66c9f26ad5
commit b956f81990
96 changed files with 21633 additions and 375 deletions
+1
View File
@@ -0,0 +1 @@
// import Factory from '@ioc:Adonis/Lucid/Factory'
@@ -0,0 +1,21 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class extends BaseSchema {
protected tableName = 'users'
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.string('pseudo', 50).notNullable
table.string('email', 255).notNullable().unique()
table.string('password', 180).notNullable()
table.string('remember_me_token').nullable()
table.timestamp('created_at', { useTz: true }).notNullable()
table.timestamp('updated_at', { useTz: true }).notNullable()
})
}
public async down() {
this.schema.dropTable(this.tableName)
}
}