22 lines
532 B
TypeScript
22 lines
532 B
TypeScript
import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
|
|
export default class extends BaseSchema {
|
|
protected tableName = 'logs'
|
|
|
|
async up() {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id')
|
|
table.string('path').notNullable()
|
|
table.integer('line_id').unsigned().references('id').inTable('lines')
|
|
table.string('PID')
|
|
table.string('SN')
|
|
table.string('description')
|
|
table.timestamps()
|
|
})
|
|
}
|
|
|
|
async down() {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|