<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddCreatedByToPengajuan extends Migration
{
    public function up()
    {
        $fields = [
            'created_by' => [
                'type'       => 'INT',
                'unsigned'   => true,
                'null'       => true,
                'after'      => 'user_id'
            ],
        ];
        $this->forge->addColumn('pengajuan', $fields);
    }

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