<?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('ocr_question_results', function (Blueprint $table) {
            $table->float('ai_score')->nullable()->after('answer_verified')
                ->comment('AI scoring result');
            $table->text('ai_feedback')->nullable()->after('ai_score')
                ->comment('AI feedback/comments');
        });
    }

    public function down(): void
    {
        Schema::table('ocr_question_results', function (Blueprint $table) {
            $table->dropColumn(['ai_score', 'ai_feedback']);
        });
    }
};
