<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     * 카드 거래 분개에 공제유형 필드 추가
     */
    public function up(): void
    {
        Schema::table('barobill_card_transaction_splits', function (Blueprint $table) {
            $table->string('deduction_type', 20)->nullable()->after('account_name')->comment('공제유형: deductible/non_deductible');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('barobill_card_transaction_splits', function (Blueprint $table) {
            $table->dropColumn('deduction_type');
        });
    }
};
