<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

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

    public function down()
    {
        $fields = [
            'user_id' => [
                'type' => 'INT',
                'unsigned' => true,
                'null' => false,
            ],
        ];
        $this->forge->modifyColumn('pengajuan', $fields);
    }
}
