import { BaseSchema } from '@adonisjs/lucid/schema'

export default class extends BaseSchema {
  protected tableName = 'order_packages'

  async up() {
    this.schema.alterTable(this.tableName, (table) => {
      table.decimal('length', 6, 2).nullable()
      table.decimal('width', 6, 2).nullable()
      table.decimal('height', 6, 2).nullable()
    })
  }

  async down() {
    this.schema.alterTable(this.tableName, (table) => {
      table.dropColumn('length')
      table.dropColumn('width')
      table.dropColumn('height')
    })
  }
}
