<?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('approval_steps', function (Blueprint $table) {
            $table->string('approver_name', 50)->nullable()->after('approver_id')
                ->comment('결재자명 스냅샷');
            $table->string('approver_department', 100)->nullable()->after('approver_name')
                ->comment('결재자 부서 스냅샷');
            $table->string('approver_position', 50)->nullable()->after('approver_department')
                ->comment('결재자 직급 스냅샷');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('approval_steps', function (Blueprint $table) {
            $table->dropColumn(['approver_name', 'approver_department', 'approver_position']);
        });
    }
};
