<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class RemoveGajiAndMasaKerjaTotalFromPengajuan extends Migration
{
    public function up()
    {
        $this->forge->dropColumn('pengajuan', [
            'tahun_gaji',
            'gajipokok_lama',
            'gajipokok_baru',
            'masa_kerja_tahun',
            'masa_kerja_bulan'
        ]);
    }

    public function down()
    {
        $this->forge->addColumn('pengajuan', [
            'tahun_gaji' => ['type' => 'INT', 'null' => true],
            'gajipokok_lama' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => true],
            'gajipokok_baru' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => true],
            'masa_kerja_tahun' => ['type' => 'INT', 'null' => true],
            'masa_kerja_bulan' => ['type' => 'INT', 'null' => true],
        ]);
    }
}
