first commit
This commit is contained in:
commit
3c0479faf0
169 files changed
+27617
No files matched your search
@@ -0,0 +1,30 @@
|
||||
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('username', 64).notNullable().unique()
|
||||
table.string('password').notNullable()
|
||||
|
||||
/**
|
||||
* TOTP secret, encrypted with the APP_KEY.
|
||||
*/
|
||||
table.text('totp_secret').notNullable()
|
||||
|
||||
/**
|
||||
* Last accepted TOTP time step, to refuse a code being replayed.
|
||||
*/
|
||||
table.integer('totp_last_step').nullable()
|
||||
|
||||
table.timestamp('created_at').notNullable()
|
||||
table.timestamp('updated_at').nullable()
|
||||
})
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.schema.dropTable(this.tableName)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user