<?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('evidence_name', 255)->nullable()->after('account_name')->comment('증빙/판매자상호');
            $table->string('description', 500)->nullable()->after('evidence_name')->comment('내역');
        });
    }

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