23 lines
599 B
TypeScript
23 lines
599 B
TypeScript
import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
|
|
export default class extends BaseSchema {
|
|
protected tableName = 'lines'
|
|
|
|
async up() {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id')
|
|
table.integer('port').notNullable()
|
|
table.integer('line_number').notNullable()
|
|
table.integer('line_clear')
|
|
table.integer('outlet')
|
|
table.integer('station_id').unsigned().references('id').inTable('stations')
|
|
table.string('apc_name')
|
|
table.timestamps()
|
|
})
|
|
}
|
|
|
|
async down() {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|