<?php

return new class extends \Illuminate\Database\Migrations\Migration
{
    /**
     * Tambah kolom biaya pada tabel nilai_plafond.
     */
    public function up(): void
    {
        \Illuminate\Support\Facades\Schema::table('nilai_plafond', function (\Illuminate\Database\Schema\Blueprint $table) {
            // PostgreSQL akan memetakan decimal ke numeric
            $table->decimal('biaya', 15, 2)->default(0);
        });
    }

    /**
     * Menghapus kolom biaya jika dilakukan rollback.
     */
    public function down(): void
    {
        \Illuminate\Support\Facades\Schema::table('nilai_plafond', function (\Illuminate\Database\Schema\Blueprint $table) {
            $table->dropColumn('biaya');
        });
    }
};