<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('finance_harvest_entries', function (Blueprint $table) {
            $table->decimal('kg_adjustment_loss', 12, 3)->nullable()->after('kg_harvested');
            $table->string('loss_reason', 255)->nullable()->after('kg_adjustment_loss');
        });
    }

    public function down(): void
    {
        Schema::table('finance_harvest_entries', function (Blueprint $table) {
            $table->dropColumn(['kg_adjustment_loss', 'loss_reason']);
        });
    }
};
