<?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('document_template_section_items', function (Blueprint $table) {
            $table->string('tolerance', 100)->nullable()->after('standard')->comment('공차/허용범위');
            $table->string('measurement_type', 30)->nullable()->after('method')->comment('측정치 입력 유형: checkbox, numeric, single_value, substitute, text');
        });
    }

    public function down(): void
    {
        Schema::table('document_template_section_items', function (Blueprint $table) {
            $table->dropColumn(['tolerance', 'measurement_type']);
        });
    }
};
