<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddBatchNumberToReimbursements extends Migration
{
    public function up()
    {
        $fields = [
            'batch_number' => [
                'type'       => 'INT',
                'constraint' => 11,
                'unsigned'   => true,
                'default'    => 0,
                'null'       => false,
                'after'      => 'reimbursement_method',
            ],
        ];

        $this->forge->addColumn('reimbursements', $fields);
    }

    public function down()
    {
        $this->forge->dropColumn('reimbursements', 'batch_number');
    }
}

