ATC_SIMPLE/BACKEND/database/migrations/1761185759777_create_logs_t...

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)
}
}