<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddPayGroupCode extends Migration
{
    public function up()
    {
        $fields = [
            'pay_group_code' => [
                'type' => 'VARCHAR',
                'constraint' => 25,
                'null' => true,
                'after' => 'pay_group_id'
            ]
        ];

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

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