<?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('payroll_items', function (Blueprint $table) {
            $table->decimal('addition_adjustment', 12, 2)->default(0)->after('loan_deduction');
            $table->decimal('deduction_adjustment', 12, 2)->default(0)->after('addition_adjustment');
        });
    }

    public function down(): void
    {
        Schema::table('payroll_items', function (Blueprint $table) {
            $table->dropColumn(['addition_adjustment', 'deduction_adjustment']);
        });
    }
};
