<?php

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

return new class extends Migration
{
    public function up()
    {
        Schema::table('tax_slabs', function (Blueprint $table) {
            // Add new columns
            $table->string('Code', 4)->nullable()->after('Tax_Name');
            $table->integer('Stand_Deduc')->default(0)->after('Code');
            $table->decimal('Cess', 5, 2)->default(0)->after('Stand_Deduc');
            $table->integer('Cess_Amount')->default(0)->after('Cess');
        });
    }

    public function down()
    {
        Schema::table('tax_slabs', function (Blueprint $table) {
            $table->dropColumn(['Code', 'Stand_Deduc', 'Cess', 'Cess_Amount']);
        });
    }
};
