<?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('ocr_question_results', function (Blueprint $table) {
            // 添加学生答案字段（TEXT类型，不创建索引）
            $table->text('student_answer')->nullable()->after('question_text')->comment('学生答案');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('ocr_question_results', function (Blueprint $table) {
            // 删除字段
            $table->dropColumn('student_answer');
        });
    }
};
