<?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('tax_deduction', 12, 2)->default(0)->after('total_deductions');
            $table->decimal('loan_deduction', 12, 2)->default(0)->after('tax_deduction');
        });
    }

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