<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('permohonan', function (Blueprint $table) {
            $table->text('registrasi_catatan')->nullable()->comment('kebutuhan untuk feature Registrasi');
            $table->unsignedBigInteger('registrasi_by')->nullable()->after('registrasi_catatan')->comment('kebutuhan untuk feature Registrasi');
            $table->timestamp('registrasi_at')->nullable()->after('registrasi_by')->comment('kebutuhan untuk feature Registrasi');
            $table->unsignedBigInteger('jenis_penilaian_id')->nullable()->after('registrasi_at')->comment('kebutuhan untuk feature Registrasi');
            $table->unsignedBigInteger('region_id')->nullable()->after('jenis_penilaian_id')->comment('kebutuhan untuk feature Registrasi');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('permohonan', function (Blueprint $table) {
            $table->dropColumn('registrasi_catatan');
            $table->dropColumn('registrasi_by');
            $table->dropColumn('registrasi_at');
            $table->dropColumn('jenis_penilaian_id');
            $table->dropColumn('region_id');
        });
    }
};
