Remove useless table

This commit is contained in:
2021-08-16 22:40:00 +02:00
parent 2c4a7c0dda
commit bd6aa52cfa

View File

@@ -1,25 +0,0 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class ApiTokens extends BaseSchema {
protected tableName = 'api_tokens'
public async up () {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.integer('user_id')
.unsigned()
.references('id')
.inTable('users')
.onDelete('CASCADE')
table.string('name').notNullable()
table.string('type').notNullable()
table.string('token', 64).notNullable()
table.timestamp('expires_at', { useTz: true }).nullable()
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}