<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddWorkDaysOnEmpPayInfo extends Migration
{
    public function up()
    {
        $fields = [
            'work_days' => [
                'type' => 'DECIMAL',
                'constraint' => '12,4',
                'null' => false,
                'after' => 'savings_account',
            ],
        ];
        $this->forge->addColumn('emp_pay_info', $fields);
    }

    public function down()
    {
        $fields = [
            'work_days',
        ];

        $this->forge->dropColumn('emp_pay_info', $fields);
    }
}
